From: Michael Vogt Date: Tue, 10 May 2005 12:03:48 +0000 (+0000) Subject: * apt-cache show shows all virtual packages instead of nothing (thanks... X-Git-Tag: 0.7.21~408 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/50d50da8fcb1652230edc3bc7901504914b58183 * apt-cache show shows all virtual packages instead of nothing (thanks to otavio) --- diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 0014563b8..3bd1435fc 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1360,6 +1360,20 @@ bool ShowPackage(CommandLine &CmdL) ++found; + // Show virtual packages + if (Pkg->ProvidesList != 0) + { + ioprintf(std::cout,_("Package %s is a virtual package provided by:\n"), + Pkg.Name()); + + pkgCache::PrvIterator I = Pkg.ProvidesList(); + for (; I.end() == false; I++) + cout << " " << I.OwnerPkg().Name() << endl; + cout << _("You should explicitly select one to show.") << endl; + continue; + } + + // Find the proper version to use. if (_config->FindB("APT::Cache::AllVersions","true") == true) {