summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-25 20:14:42 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-25 20:14:42 +0200
commit3dd823bb56cc972b634cc7525581d0c38b1cd026 (patch)
tree5bf3ed32c291f521ff19a3f4c815eadca532835d
parent131a3ca3e4e4eec9ae5307ce10a7b6c47aa14a54 (diff)
parentdc67d95fa4cb0141235bf5b4195ffd39e4c96bf4 (diff)
show in madison command again also source packages (LP: #614589)
-rw-r--r--cmdline/apt-cache.cc16
-rw-r--r--debian/changelog5
2 files changed, 15 insertions, 6 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;
diff --git a/debian/changelog b/debian/changelog
index b76880b0f..41ec1b2a1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,7 +13,10 @@ apt (0.8.1) UNRELEASED; urgency=low
* Fix spelling error in cmdline/apt-get.cc. Thanks to Osamu Aoki
Closes: #594211
- -- Christian Perrier <bubulle@debian.org> Wed, 25 Aug 2010 08:35:49 +0200
+ [ David Kalnischkies ]
+ * show in madison command again also source packages (LP: #614589)
+
+ -- David Kalnischkies <kalnischkies@gmail.com> Wed, 25 Aug 2010 17:46:48 +0200
apt (0.8.0) unstable; urgency=low