]> git.saurik.com Git - apt.git/commitdiff
* Improve build-depends handling of virtual packages ev...
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:02:18 +0000 (17:02 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:02:18 +0000 (17:02 +0000)
Author: mdz
Date: 2003-07-25 22:03:49 GMT
* Improve build-depends handling of virtual packages even further, so that
it will now also try to satisfy build-depends on virtual packages if they
are not installed.  Note that this only works if there is only one
package providing the virtual package, as in other cases (Closes: #165404)

cmdline/apt-get.cc
debian/changelog

index c81538a23e94772738c7d6506270ec219a2fcdec..0ab1dc1d256f60d19e29c36f9dee44028a254234 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-get.cc,v 1.132 2003/07/22 03:00:19 mdz Exp $
+// $Id: apt-get.cc,v 1.133 2003/07/25 22:03:49 mdz Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -2093,7 +2093,9 @@ bool DoBuildDep(CommandLine &CmdL)
             * installed
             */
             pkgCache::PrvIterator Prv = Pkg.ProvidesList();
-            for (; Prv.end() != true; Prv++) {
+           bool providedBySomething = !Prv.end();
+            for (; Prv.end() != true; Prv++)
+           {
               if ((*Cache)[Prv.OwnerPkg()].InstVerIter(*Cache).end() == false)
                  break;
             }
@@ -2101,7 +2103,7 @@ bool DoBuildDep(CommandLine &CmdL)
             // Get installed version and version we are going to install
            pkgCache::VerIterator IV = (*Cache)[Pkg].InstVerIter(*Cache);
 
-            if (Prv.end() == true || (*D).Version != "") {
+            if (!providedBySomething || (*D).Version[0] != '\0') {
                  /* We either have a versioned dependency (so a provides won't do)
                     or nothing is providing this package */
 
index 1a6b6fa8b8186a2b625b65a4131c1740504d5e25..dc2670cd601fa158db67f5a6f77a33e562ac21a5 100644 (file)
@@ -5,6 +5,10 @@ apt (0.5.8) unstable; urgency=low
     <philippe.batailler@free.fr> (Closes: #182194)
   * Give a warning if an illegal type abbreviation is used when looking up a
     configuration item (Closes: #168453)
+  * Improve build-depends handling of virtual packages even further, so that
+    it will now also try to satisfy build-depends on virtual packages if they
+    are not installed.  Note that this only works if there is only one
+    package providing the virtual package, as in other cases (Closes: #165404)
 
  --