summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:02:18 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:02:18 +0000
commita8a0fdcf6311e01f137b7e367c02246160ade020 (patch)
tree3f278578495ea52ec3e80cf3ab1d929942e8aa47 /cmdline
parent8d99802677287a86759232898199db40add923fd (diff)
* Improve build-depends handling of virtual packages ev...
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)
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index c81538a23..0ab1dc1d2 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -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 */