##################################################################### */
/*}}}*/
// Include Files /*{{{*/
-#ifdef __GNUG__
-#pragma implementation "apt-pkg/acquire-item.h"
-#endif
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/sourcelist.h>
Dequeue();
return;
}
-
+
Status = StatError;
Dequeue();
}
if(found)
{
// queue the diffs
- int last_space = Description.rfind(" ");
- if(last_space != string::npos)
- Description.erase(last_space, Description.size()-last_space);
+ 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;
return true;
}
}
-
+
// Nothing found, report and return false
// Failing here is ok, if we return false later, the full
// IndexFile is queued
// queue the right diff
Desc.URI = string(RealURI) + ".diff/" + available_patches[0].file + ".gz";
Desc.Description = Description + " " + available_patches[0].file + string(".pdiff");
-
DestFile = _config->FindDir("Dir::State::lists") + "partial/";
DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file);
void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
{
-
// no .bz2 found, retry with .gz
if(Desc.URI.substr(Desc.URI.size()-3) == "bz2") {
Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz";
if(Status == StatTransientNetworkError)
{
Item::Failed(Message,Cnf);
- // move the sigfile back on network failures (and re-authenticated?)
+ // move the sigfile back on transient network failures
if(FileExists(DestFile))
Rename(DestFile,Final);