diff options
author | Michael Vogt <mvo@debian.org> | 2014-09-21 10:18:03 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-09-21 10:18:03 +0200 |
commit | b0f4b486e6850c5f98520ccf19da71d0ed748ae4 (patch) | |
tree | b762d4679dd4705da68d107290bc01622d7de038 /apt-private/private-update.cc | |
parent | 2bd6be8ad24583ed9935f5c5d57c04ba7344111e (diff) |
generalize Acquire::GzipIndex
Diffstat (limited to 'apt-private/private-update.cc')
-rw-r--r-- | apt-private/private-update.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc index 860d84b86..1cf3012ed 100644 --- a/apt-private/private-update.cc +++ b/apt-private/private-update.cc @@ -56,10 +56,17 @@ bool DoUpdate(CommandLine &CmdL) if (List->GetIndexes(&Fetcher,true) == false) return false; + std::string compExt = APT::Configuration::getCompressionTypes()[0]; pkgAcquire::UriIterator I = Fetcher.UriBegin(); for (; I != Fetcher.UriEnd(); ++I) - c1out << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << + { + std::string FileName = flNotDir(I->Owner->DestFile); + if(compExt.empty() == false && + APT::String::Endswith(FileName, compExt)) + FileName = FileName.substr(0, FileName.size() - compExt.size() - 1); + c1out << '\'' << I->URI << "' " << FileName << ' ' << I->Owner->FileSize << ' ' << I->Owner->HashSum() << std::endl; + } return true; } |