[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#202493: patch to include this feature



Hello Folks,

I'm including one simple patch to add this feature on apt-cache. Any
questions, fell free to contact me.

TIA,
Otavio
Index: cmdline/apt-cache.cc
===================================================================
RCS file: /cvs/deity/apt/cmdline/apt-cache.cc,v
retrieving revision 1.65
diff -u -r1.65 apt-cache.cc
--- cmdline/apt-cache.cc	22 Jul 2003 03:10:01 -0000	1.65
+++ cmdline/apt-cache.cc	29 Jul 2003 02:11:36 -0000
@@ -1358,6 +1358,19 @@
 
       ++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)
       {
-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://www.freedom.ind.br/otavio
---------------------------------------------

Reply to: