summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:54:47 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:54:47 +0000
commit421c8d109932a2615b9327c8b69aad715d4b1162 (patch)
tree598bab85a1d54cda33ef75662b5287b2c47f7be0 /apt-pkg/packagemanager.cc
parenteecf9bf7744f44f011234bccfc35218f80ae3526 (diff)
Bug fixes
Author: jgg Date: 1999-09-30 06:30:34 GMT Bug fixes
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc31
1 files changed, 21 insertions, 10 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 28a8d7fb2..b76f78b3c 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: packagemanager.cc,v 1.20 1999/08/12 05:59:54 jgg Exp $
+// $Id: packagemanager.cc,v 1.21 1999/09/30 06:30:34 jgg Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
@@ -414,12 +414,17 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
/* See if this packages install version has any predependencies
that are not met by 'now' packages. */
for (DepIterator D = Cache[Pkg].InstVerIter(Cache).DependsList();
- D.end() == false; D++)
+ D.end() == false; )
{
- if (D->Type == pkgCache::Dep::PreDepends)
+ // Compute a single dependency element (glob or)
+ pkgCache::DepIterator Start;
+ pkgCache::DepIterator End;
+ D.GlobOr(Start,End);
+
+ while (End->Type == pkgCache::Dep::PreDepends)
{
// Look for possible ok targets.
- Version **VList = D.AllTargets();
+ Version **VList = Start.AllTargets();
bool Bad = true;
for (Version **I = VList; *I != 0 && Bad == true; I++)
{
@@ -450,18 +455,24 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
}
delete [] VList;
-
- if (Bad == true)
- return _error->Error("Internal Error, Couldn't configure a pre-depend");
- continue;
+ /* If this or element did not match then continue on to the
+ next or element until a matching element is found*/
+ if (Bad == true)
+ {
+ if (Start == End)
+ return _error->Error("Internal Error, Couldn't configure a pre-depend");
+ Start++;
+ }
+ else
+ break;
}
- if (D->Type == pkgCache::Dep::Conflicts)
+ if (End->Type == pkgCache::Dep::Conflicts)
{
/* Look for conflicts. Two packages that are both in the install
state cannot conflict so we don't check.. */
- Version **VList = D.AllTargets();
+ Version **VList = End.AllTargets();
for (Version **I = VList; *I != 0; I++)
{
VerIterator Ver(Cache,*I);