Ver código fonte

* merged from the apt--pdiff branch

Michael Vogt 19 anos atrás
pai
commit
0660506d19
2 arquivos alterados com 13 adições e 11 exclusões
  1. 12 11
      apt-pkg/acquire-item.cc
  2. 1 0
      debian/changelog

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

@@ -270,17 +270,13 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile)
 	 }
       }
 
-      // no information how to get the patches, bail out
-      if(!found) 
-      {
-	 if(Debug)
-	    std::clog << "Can't find a patch in the index file" << std::endl;
-	 // Failed will queue a big package file
-	 Failed("", NULL);
-      } 
-      else 
+      // we have something, queue the next diff
+      if(found) 
       {
 	 // queue the diffs
+	int last_space = Description.rfind(" ");
+	if(last_space != string::npos)
+	  Description.erase(last_space, Description.size()-last_space);
 	 new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
 			      ExpectedMD5, available_patches);
 	 Complete = false;
@@ -290,6 +286,11 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile)
       }
    }
 
+   // Nothing found, report and return false
+   // Failing here is ok, if we return false later, the full
+   // IndexFile is queued
+   if(Debug)
+      std::clog << "Can't find a patch in the index file" << std::endl;
    return false;
 }
 
@@ -356,7 +357,7 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
 
    Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
 
-   Desc.Description = URIDesc;
+   Description = URIDesc;
    Desc.Owner = this;
    Desc.ShortDesc = ShortDesc;
 
@@ -465,7 +466,7 @@ bool pkgAcqIndexDiffs::QueueNextDiff()
 
    // queue the right diff
    Desc.URI = string(RealURI) + ".diff/" + available_patches[0].file + ".gz";
-   Desc.Description = available_patches[0].file + string(".pdiff");
+   Desc.Description = Description + " " + available_patches[0].file + string(".pdiff");
 
    DestFile = _config->FindDir("Dir::State::lists") + "partial/";
    DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file);

+ 1 - 0
debian/changelog

@@ -1,6 +1,7 @@
 apt (0.7.0) experimental; urgency=low
 
   * Branch that contains tall the new features
+  * Removed all #pragma interface/implementation
 
  -- Michael Vogt <mvo@debian.org>  Thu, 14 Dec 2006 11:31:41 +0100