summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-02-07 11:23:28 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-02-07 11:23:28 +0100
commitfbd64f76a595b61d2aaa9c0615903d9b68786930 (patch)
treed0c5cda8588667158a68df805df3ec53a2f66143 /apt-pkg/algorithms.cc
parent7fefa1842da668283785113ae174df34f97f6df5 (diff)
* apt-pkg/algorithms.cc:
- mark pseudo packages of installed all packages as configured in the simulation as we don't call configure for these packages
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 0fbce3c2a..0d26f8f66 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -162,7 +162,28 @@ bool pkgSimulate::Configure(PkgIterator iPkg)
}
}
-// Sim.MarkInstall(Pkg,false);
+ if (Sim[Pkg].InstBroken() == true)
+ {
+ /* We don't call Configure for Pseudo packages and if the 'all' is already installed
+ the simulation will think the pseudo package is not installed, so if something is
+ broken we walk over the dependencies and search for not installed pseudo packages */
+ for (pkgCache::DepIterator D = Sim[Pkg].InstVerIter(Sim).DependsList(); D.end() == false; D++)
+ {
+ if (Sim.IsImportantDep(D) == false ||
+ (Sim[D] & pkgDepCache::DepInstall) != 0)
+ continue;
+ pkgCache::PkgIterator T = D.TargetPkg();
+ if (T.end() == true || T->CurrentVer != 0 || Flags[T->ID] != 0)
+ continue;
+ pkgCache::PkgIterator A = T.Group().FindPkg("all");
+ if (A.end() == true || A->VersionList == 0 || A->CurrentVer == 0 ||
+ Cache.VS().CheckDep(A.CurVersion(), pkgCache::Dep::Equals, T.CandVersion()) == false)
+ continue;
+ Sim.MarkInstall(T, false);
+ Flags[T->ID] = 2;
+ }
+ }
+
if (Sim[Pkg].InstBroken() == true)
{
cout << "Conf " << Pkg.FullName(false) << " broken" << endl;