<< DestFile << " -> " << FinalFile << std::endl;
}
Rename(DestFile,FinalFile);
+ chmod(FinalFile.c_str(),0644);
// see if there is more to download
if(available_patches.size() > 0) {
if(comprExt.empty())
{
// autoselect the compression method
- if(FileExists("/usr/bin/bzip2"))
+ if(FileExists("/bin/bzip2"))
CompressionExtension = ".bz2";
else
CompressionExtension = ".gz";
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";
Complete = false;
Dequeue();
return;
+ }
+
+ // on decompression failure, remove bad versions in partial/
+ if(Decompression && Erase) {
+ string s = _config->FindDir("Dir::State::lists") + "partial/";
+ s += URItoFileName(RealURI);
+ unlink(s.c_str());
}
-
Item::Failed(Message,Cnf);
}
// Move it into position
Rename(DestFile,FinalFile);
}
+ chmod(FinalFile.c_str(),0644);
DestFile = FinalFile;
}
// Queue Packages file (either diff or full packages files, depending
// on the users option)
- if(_config->FindB("Acquire::PDiffs",false) == false)
+ if(_config->FindB("Acquire::PDiffs",true) == true)
new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description,
(*Target)->ShortDesc, ExpectedIndexMD5);
else
// check for missing sigs (that where not fatal because otherwise we had
// bombed earlier)
string missingkeys;
- string msg = _("There are no public key available for the "
+ string msg = _("There is no public key available for the "
"following key IDs:\n");
pos = Message.find("NO_PUBKEY ");
if (pos != std::string::npos)