diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-09-26 18:09:32 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-09-26 18:09:32 +0200 |
commit | 48fd4181ad0261d5f3e8894dcbfccfaea1530645 (patch) | |
tree | 9df89db20deaf1ffcaf4846858c2ad126c08aacc /apt-private/private-update.cc | |
parent | d916e2a93b798e29d342e9498266767c5be8e2a5 (diff) | |
parent | 5f982b9d903b38bb5549479f0111d31e2695090c (diff) |
Merge remote-tracking branch 'donkult/feature/generalize-gzipindex' into debian/sid
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; } |