Bläddra i källkod

* apt-cache show <virtual-pkg> shows all virtual packages instead of nothing (thanks to otavio)

Michael Vogt 21 år sedan
förälder
incheckning
50d50da8fc
1 ändrade filer med 14 tillägg och 0 borttagningar
  1. 14 0
      cmdline/apt-cache.cc

+ 14 - 0
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)
       {