From fbd64f76a595b61d2aaa9c0615903d9b68786930 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 7 Feb 2011 11:23:28 +0100 Subject: * 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 --- apt-pkg/algorithms.cc | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'apt-pkg') 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; -- cgit v1.2.3