Explorar el Código

* 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

David Kalnischkies hace 15 años
padre
commit
fbd64f76a5
Se han modificado 2 ficheros con 26 adiciones y 2 borrados
  1. 22 1
      apt-pkg/algorithms.cc
  2. 4 1
      debian/changelog

+ 22 - 1
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;

+ 4 - 1
debian/changelog

@@ -75,6 +75,9 @@ apt (0.8.11) UNRELEASED; urgency=low
   * doc/apt-cache.8.xml:
     - describe reality as apt-cache just queries and doesn't manipulate
       the caches. Thanks to Enrico Zini for spotting it! (Closes: #612009)
+  * 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
 
   [ Michael Vogt ]
   * methods/http.cc:
@@ -92,7 +95,7 @@ apt (0.8.11) UNRELEASED; urgency=low
       will actually test uncompressed indexes regardless of the internal
       default value of Acquire::GzipIndexes.
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Fri, 04 Feb 2011 22:52:25 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 07 Feb 2011 11:21:12 +0100
 
 apt (0.8.10.3) unstable; urgency=low