Преглед изворни кода

* apt-pkg/acquire-item.cc
- more usefull description of the downloaded patches

Michael Vogt пре 19 година
родитељ
комит
14443594b5
1 измењених фајлова са 5 додато и 2 уклоњено
  1. 5 2
      apt-pkg/acquire-item.cc

+ 5 - 2
apt-pkg/acquire-item.cc

@@ -274,6 +274,9 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile)
       if(found) 
       if(found) 
       {
       {
 	 // queue the diffs
 	 // 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,
 	 new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
 			      ExpectedMD5, available_patches);
 			      ExpectedMD5, available_patches);
 	 Complete = false;
 	 Complete = false;
@@ -354,7 +357,7 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
 
 
    Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
    Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
 
 
-   Desc.Description = URIDesc;
+   Description = URIDesc;
    Desc.Owner = this;
    Desc.Owner = this;
    Desc.ShortDesc = ShortDesc;
    Desc.ShortDesc = ShortDesc;
 
 
@@ -463,7 +466,7 @@ bool pkgAcqIndexDiffs::QueueNextDiff()
 
 
    // queue the right diff
    // queue the right diff
    Desc.URI = string(RealURI) + ".diff/" + available_patches[0].file + ".gz";
    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 = _config->FindDir("Dir::State::lists") + "partial/";
    DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file);
    DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file);