Explorar el Código

* cmdline/apt-get.cc:
- do two passes when installing tasks, first ignoring dependencies,
then resolving them and run the problemResolver at the end
so that it can correct any missing dependencies. This should
fix livecd building for kubuntu (thanks to Jonathan Riddell
for reporting the problem)

Michael Vogt hace 18 años
padre
commit
c22356d861
Se han modificado 3 ficheros con 29 adiciones y 13 borrados
  1. 17 12
      cmdline/apt-get.cc
  2. 1 1
      configure.in
  3. 11 0
      debian/changelog

+ 17 - 12
cmdline/apt-get.cc

@@ -1495,19 +1495,24 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix,
    
    bool found = false;
    bool res = true;
-   for (Pkg = Cache.PkgBegin(); Pkg.end() == false; Pkg++)
+
+   // two runs, first ignore dependencies, second install any missing
+   for(int IgnoreBroken=1; IgnoreBroken >= 0; IgnoreBroken--)
    {
-      pkgCache::VerIterator ver = Cache[Pkg].CandidateVerIter(Cache);
-      if(ver.end())
-	 continue;
-      pkgRecords::Parser &parser = Recs.Lookup(ver.FileList());
-      parser.GetRec(start,end);
-      strncpy(buf, start, end-start);
-      buf[end-start] = 0x0;
-      if (regexec(&Pattern,buf,0,0,0) != 0)
-	 continue;
-      res &= TryToInstall(Pkg,Cache,Fix,Remove,true,ExpectedInst);
-      found = true;
+      for (Pkg = Cache.PkgBegin(); Pkg.end() == false; Pkg++)
+      {
+	 pkgCache::VerIterator ver = Cache[Pkg].CandidateVerIter(Cache);
+	 if(ver.end())
+	    continue;
+	 pkgRecords::Parser &parser = Recs.Lookup(ver.FileList());
+	 parser.GetRec(start,end);
+	 strncpy(buf, start, end-start);
+	 buf[end-start] = 0x0;
+	 if (regexec(&Pattern,buf,0,0,0) != 0)
+	    continue;
+	 res &= TryToInstall(Pkg,Cache,Fix,Remove,IgnoreBroken,ExpectedInst);
+	 found = true;
+      }
    }
    
    // now let the problem resolver deal with any issues

+ 1 - 1
configure.in

@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.7.9ubuntu14")
+AC_DEFINE_UNQUOTED(VERSION,"0.7.9ubuntu15")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)

+ 11 - 0
debian/changelog

@@ -1,3 +1,14 @@
+apt (0.7.9ubuntu15) hardy; urgency=low
+
+  * cmdline/apt-get.cc:
+    - do two passes when installing tasks, first ignoring dependencies,
+      then resolving them and run the problemResolver at the end
+      so that it can correct any missing dependencies. This should
+      fix livecd building for kubuntu (thanks to Jonathan Riddell 
+      for reporting the problem)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 13 Mar 2008 23:25:45 +0100
+
 apt (0.7.9ubuntu14) hardy; urgency=low
 
   * cmdline/apt-get.cc: