* Patch from Otavio Salvador to avoid listing suggests/...
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:02:45 +0000 (17:02 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:02:45 +0000 (17:02 +0000)
Author: mdz
Date: 2003-08-08 23:48:48 GMT
* Patch from Otavio Salvador to avoid listing suggests/recommends which
are Provided by a package which is already installed (Closes: #200395)

cmdline/apt-get.cc
debian/changelog

index 6aaa4e8..ab069dd 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-get.cc,v 1.135 2003/08/08 23:45:00 mdz Exp $
+// $Id: apt-get.cc,v 1.136 2003/08/08 23:48:48 mdz Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -1527,6 +1527,22 @@ bool DoInstall(CommandLine &CmdL)
                 pkgCache::DepIterator Start;
                 pkgCache::DepIterator End;
                 D.GlobOr(Start,End);
+
+                /* 
+                 * If this is a virtual package, we need to check the list of
+                 * packages that provide it and see if any of those are
+                 * installed
+                 */
+                pkgCache::PrvIterator Prv = Start.TargetPkg().ProvidesList();
+                bool providedBySomething = false;
+                for (; Prv.end() != true; Prv++)
+                   if ((*Cache)[Prv.OwnerPkg()].InstVerIter(*Cache).end() == false) {
+                      providedBySomething = true;
+                      break;
+                   }
+
+                if (providedBySomething) continue;
+            
                 do
                   {
                     if (Start->Type == pkgCache::Dep::Suggests) {
index dffa117..da82fc2 100644 (file)
@@ -21,8 +21,10 @@ apt (0.5.9) unstable; urgency=low
   * Patch from Otavio Salvador to avoid listing suggests/recommends for
     packages which are selected for installation at the same time as the
     package which suggests/recommends them (Closes: #200102)
+  * Patch from Otavio Salvador to avoid listing suggests/recommends which
+    are Provided by a package which is already installed (Closes: #200395)
 
- -- Matt Zimmerman <mdz@debian.org>  Fri,  8 Aug 2003 19:31:25 -0400
+ -- Matt Zimmerman <mdz@debian.org>  Fri,  8 Aug 2003 19:47:19 -0400
 
 apt (0.5.8) unstable; urgency=medium