]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-cache.cc
* apt-cache show <virtual-pkg> shows all virtual packages instead of nothing (thanks...
[apt.git] / cmdline / apt-cache.cc
index 0014563b8a6a5765ca09a692bd686016b7235d2f..3bd1435fc3c8e625a67f08b800c0396e6c31d490 100644 (file)
@@ -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)
       {