Преглед на файлове

Merge from Michael tree

bubulle@debian.org преди 20 години
родител
ревизия
a3c8f91f03
променени са 8 файла, в които са добавени 53 реда и са изтрити 30 реда
  1. 7 12
      apt-pkg/acquire-item.cc
  2. 6 5
      apt-pkg/deb/deblistparser.cc
  3. 3 2
      cmdline/apt-cache.cc
  4. 1 10
      cmdline/apt-get.cc
  5. 1 1
      configure.in
  6. 1 0
      debian/apt.dirs
  7. 32 0
      debian/changelog
  8. 2 0
      methods/connect.cc

+ 7 - 12
apt-pkg/acquire-item.cc

@@ -340,12 +340,6 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
       // File was already in place.  It needs to be re-verified
       // because Release might have changed, so Move it into partial
       Rename(Final,DestFile);
-      // unlink the file and do not try to use I-M-S and Last-Modified
-      // if the users proxy is broken
-      if(_config->FindB("Acquire::BrokenProxy", false) == true) {
-	 std::cerr << "forcing re-get of the signature file as requested" << std::endl;
-	 unlink(DestFile.c_str());
-      }
    }
 
    QueueURI(Desc);
@@ -395,18 +389,19 @@ void pkgAcqMetaSig::Done(string Message,unsigned long Size,string MD5,
 									/*}}}*/
 void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
 {
-   // Delete any existing sigfile, so that this source isn't
-   // mistakenly trusted
-   string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
-   unlink(Final.c_str());
 
-   // if we get a timeout if fail
+   // if we get a network error we fail gracefully
    if(LookupTag(Message,"FailReason") == "Timeout" || 
-      LookupTag(Message,"FailReason") == "TmpResolveFailure") {
+      LookupTag(Message,"FailReason") == "TmpResolveFailure" ||
+      LookupTag(Message,"FailReason") == "ConnectionRefused") {
       Item::Failed(Message,Cnf);
       return;
    }
 
+   // Delete any existing sigfile when the acquire failed
+   string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
+   unlink(Final.c_str());
+
    // queue a pkgAcqMetaIndex with no sigfile
    new pkgAcqMetaIndex(Owner, MetaIndexURI, MetaIndexURIDesc, MetaIndexShortDesc,
 		       "", IndexTargets, MetaIndexParser);

+ 6 - 5
apt-pkg/deb/deblistparser.cc

@@ -504,11 +504,12 @@ bool debListParser::ParseProvides(pkgCache::VerIterator Ver)
       Start = ParseDepends(Start,Stop,Package,Version,Op);
       if (Start == 0)
 	 return _error->Error("Problem parsing Provides line");
-      if (Op != pkgCache::Dep::NoOp)
-	 return _error->Error("Malformed provides line");
-
-      if (NewProvides(Ver,Package,Version) == false)
-	 return false;
+      if (Op != pkgCache::Dep::NoOp) {
+	 _error->Warning("Ignoring Provides line with DepCompareOp for package %s", Package.c_str());
+      } else {
+	 if (NewProvides(Ver,Package,Version) == false)
+	    return false;
+      }
 
       if (Start == Stop)
 	 break;

+ 3 - 2
cmdline/apt-cache.cc

@@ -1574,10 +1574,11 @@ bool Madison(CommandLine &CmdL)
 
    pkgCache &Cache = *GCache;
 
-   // Create the text record parsers
+   // Create the src text record parsers and ignore errors about missing
+   // deb-src lines that are generated from pkgSrcRecords::pkgSrcRecords
    pkgSrcRecords SrcRecs(*SrcList);
    if (_error->PendingError() == true)
-      return false;
+      _error->Discard();
 
    for (const char **I = CmdL.FileList + 1; *I != 0; I++)
    {

+ 1 - 10
cmdline/apt-get.cc

@@ -1368,7 +1368,7 @@ bool DoUpdate(CommandLine &CmdL)
    }
    
    // Clean out any old list files
-   if (_config->FindB("APT::Get::List-Cleanup",true) == true)
+   if (!Failed && _config->FindB("APT::Get::List-Cleanup",true) == true)
    {
       if (Fetcher.Clean(_config->FindDir("Dir::State::lists")) == false ||
 	  Fetcher.Clean(_config->FindDir("Dir::State::lists") + "partial/") == false)
@@ -1411,15 +1411,6 @@ bool DoUpgrade(CommandLine &CmdL)
 /* Install named packages */
 bool DoInstall(CommandLine &CmdL)
 {
-   // Lock the list directory
-   FileFd Lock;
-   if (_config->FindB("Debug::NoLocking",false) == false)
-   {
-      Lock.Fd(GetLock(_config->FindDir("Dir::State::Lists") + "lock"));
-      if (_error->PendingError() == true)
-        return _error->Error(_("Unable to lock the list directory"));
-   }
-   
    CacheFile Cache;
    if (Cache.OpenForInstall() == false || 
        Cache.CheckDeps(CmdL.FileSize() != 1) == false)

+ 1 - 1
configure.in

@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.43.2")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.43.3")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)

+ 1 - 0
debian/apt.dirs

@@ -2,6 +2,7 @@ usr/bin
 usr/lib/apt/methods
 usr/lib/dpkg/methods/apt
 etc/apt
+etc/apt/sources.list.d
 var/cache/apt/archives/partial
 var/lib/apt/lists/partial
 var/lib/apt/periodic

+ 32 - 0
debian/changelog

@@ -1,3 +1,35 @@
+apt (0.6.43.3) unstable; urgency=low
+
+  * Merge bubulle@debian.org--2005/apt--main--0 up to patch-186:
+    * ca.po: Completed to 512t. Closes: #351592
+    * eu.po: Completed to 512t. Closes: #350483
+    * ja.po: Completed to 512t. Closes: #349806
+    * pl.po: Completed to 512t. Closes: #349514
+    * sk.po: Completed to 512t. Closes: #349474
+    * gl.po: Completed to 512 strings Closes: #349407
+    * sv.po: Completed to 512 strings Closes: #349210
+    * ru.po: Completed to 512 strings Closes: #349154
+    * da.po: Completed to 512 strings Closes: #349084
+    * fr.po: Completed to 512 strings
+    * vi.po: Completed to 511 strings  Closes: #348968
+    * zh_CN.po: Completed to 512t. Closes: #353936
+    * it.po: Completed to 512t. Closes: #352803
+    * pt_BR.po: Completed to 512t. Closes: #352419
+    * LINGUAS: Add Welsh
+    * *.po: Updated from sources (512 strings)
+  * apt-pkg/deb/deblistparser.cc:
+    - don't explode on a DepCompareOp in a Provides line, but warn about
+      it and ignore it otherwise (thanks to James Troup for reporting it)
+  * cmdline/apt-get.cc:
+    - don't lock the lists directory in DoInstall, breaks --print-uri 
+      (thanks to James Troup for reporting it)
+  * debian/apt.dirs: create /etc/apt/sources.list.d 
+  * make apt-cache madison work without deb-src entries (#352583)
+  * cmdline/apt-get.cc: only run the list-cleaner if a update was 
+    successfull
+
+ -- Michael Vogt <mvo@debian.org>  Wed, 22 Feb 2006 10:13:04 +0100
+
 apt (0.6.43.2) unstable; urgency=low
 
   * Merge bubulle@debian.org--2005/apt--main--0 up to patch-166:

+ 2 - 0
methods/connect.cc

@@ -103,6 +103,8 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
    if (Err != 0)
    {
       errno = Err;
+      if(errno == ECONNREFUSED)
+         Owner->SetFailExtraMsg("\nFailReason: ConnectionRefused");
       return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(),
 			   Service,Name);
    }