diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-10-27 15:57:12 +0100 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-10-27 15:57:12 +0100 |
commit | e29a7a394cfd41e8bad81535e0a8c07654f34bf6 (patch) | |
tree | c317e2f45aa1c96300028fb830555f248db5771e /apt-private/private-update.cc | |
parent | bc5095b7d708c7e376f98be6edc2ad7cceca57ed (diff) | |
parent | 28460cb27846b2437010b08adf10bde18e370974 (diff) |
Merge remote-tracking branch 'upstream/debian/sid' into debian/sid
Diffstat (limited to 'apt-private/private-update.cc')
-rw-r--r-- | apt-private/private-update.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc index 0f2f7a8da..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; } @@ -83,7 +90,7 @@ bool DoUpdate(CommandLine &CmdL) for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() != true; ++I) { pkgDepCache::StateCache &state = Cache[I]; - if (I->CurrentVer != 0 && state.Upgradable()) + if (I->CurrentVer != 0 && state.Upgradable() && state.CandidateVer != NULL) upgradable++; } const char *msg = P_( |