summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc27
1 files changed, 24 insertions, 3 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 0fbce3c2a..66c182b23 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;
@@ -1493,9 +1514,9 @@ bool ListUpdate(pkgAcquireStatus &Stat,
}
if (TransientNetworkFailure == true)
- _error->Warning(_("Some index files failed to download, they have been ignored, or old ones used instead."));
+ _error->Warning(_("Some index files failed to download. They have been ignored, or old ones used instead."));
else if (Failed == true)
- return _error->Error(_("Some index files failed to download, they have been ignored, or old ones used instead."));
+ return _error->Error(_("Some index files failed to download. They have been ignored, or old ones used instead."));
// Run the success scripts if all was fine