diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-26 19:07:11 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-26 19:07:11 +0200 |
commit | 1497b87da18106b38f004990ca4bf7ee79862b1d (patch) | |
tree | af7aea54c7bd5efbfd4fd25a865676510ab6eee6 /cmdline/apt-cache.cc | |
parent | 30fed7e4539866ad39e98de7281289646348bed1 (diff) | |
parent | 3dd823bb56cc972b634cc7525581d0c38b1cd026 (diff) |
* merged fixes from the debian-sid bzr branch:
* Thai (Theppitak Karoonboonyanan). Closes: #592695
* Russian (Yuri Kozlov). Closes: #594232
* Slovak (Ivan Masár). Closes: #594255
* Swedish (Daniel Nylander). Closes: #594241
* Japanese (Kenshi Muto, Osamu Aoki). Closes: #594265
* Italian (Milo Casagrande). Closes: #594238
* Asturian (maacub). Closes: #594303
* Fix spelling error in cmdline/apt-get.cc. Thanks to Osamu Aoki
Closes: #594211
* show in madison command again also source packages (LP: #614589)
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r-- | cmdline/apt-cache.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 6813d2978..74a4f69c2 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1664,10 +1664,11 @@ bool Madison(CommandLine &CmdL) _error->Discard(); APT::CacheSetHelper helper(true, GlobalError::NOTICE); - APT::PackageSet pkgset = APT::PackageSet::FromCommandLine(CacheFile, CmdL.FileList + 1, helper); - for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg) + for (const char **I = CmdL.FileList + 1; *I != 0; I++) { - if (Pkg.end() == false) + _error->PushToStack(); + APT::PackageSet pkgset = APT::PackageSet::FromString(CacheFile, *I, helper); + for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg) { for (pkgCache::VerIterator V = Pkg.VersionList(); V.end() == false; V++) { @@ -1698,16 +1699,21 @@ bool Madison(CommandLine &CmdL) } } - SrcRecs.Restart(); pkgSrcRecords::Parser *SrcParser; - while ((SrcParser = SrcRecs.Find(Pkg.Name(),false)) != 0) + bool foundSomething = false; + while ((SrcParser = SrcRecs.Find(*I, false)) != 0) { + foundSomething = true; // Maybe support Release info here too eventually cout << setw(10) << SrcParser->Package() << " | " << setw(10) << SrcParser->Version() << " | " << SrcParser->Index().Describe(true) << endl; } + if (foundSomething == true) + _error->RevertToStack(); + else + _error->MergeWithStack(); } return true; |