summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@bottom>2006-12-14 11:58:25 +0100
committerMichael Vogt <egon@bottom>2006-12-14 11:58:25 +0100
commit0660506d1916f6538359f238e860804441ba24f3 (patch)
tree982fdeabc8e2db0d559bf42ea7b03588cfd7be8b /apt-pkg/acquire-item.cc
parent5cb3acda9e97a13e669746b9e772350c7938e731 (diff)
parent14443594b5fdd5a99cb94434bddfbae098e83ecd (diff)
* merged from the apt--pdiff branch
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index f620dff93..bcffa77f5 100644
--- a/apt-pkg/acquire-item.cc
+++ b/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);