Procházet zdrojové kódy

* apt-pkg/packagemanager.cc, apt-pkg/deb/dpkgpm.cc:
- move the state file writting into the Go() implementation
of dpkgpm (closes: #498799)
* apt-pkg/algorithms.cc:
- fix simulation performance drop (thanks to Ferenc Wagner
for reporting the issue)

Michael Vogt před 18 roky
rodič
revize
496d5c709d

+ 2 - 1
apt-pkg/algorithms.cc

@@ -37,7 +37,8 @@ pkgProblemResolver *pkgProblemResolver::This = 0;
    this is not necessary since the pkgCaches are fully shared now. */
 pkgSimulate::pkgSimulate(pkgDepCache *Cache) : pkgPackageManager(Cache),
 		            iPolicy(Cache),
-                            Sim(&Cache->GetCache(),&iPolicy)
+			    Sim(&Cache->GetCache(),&iPolicy),
+			    group(Sim)
 {
    Sim.Init(0);
    Flags = new unsigned char[Cache->Head().PackageCount];

+ 1 - 0
apt-pkg/algorithms.h

@@ -60,6 +60,7 @@ class pkgSimulate : public pkgPackageManager
    
    Policy iPolicy;
    pkgDepCache Sim;
+   pkgDepCache::ActionGroup group;
    
    // The Actuall installation implementation
    virtual bool Install(PkgIterator Pkg,string File);

+ 2 - 0
apt-pkg/deb/dpkgpm.cc

@@ -956,6 +956,8 @@ bool pkgDPkgPM::Go(int OutStatusFd)
 
    if (RunScripts("DPkg::Post-Invoke") == false)
       return false;
+
+   Cache.writeStateFile(NULL);
    return true;
 }
 									/*}}}*/

+ 0 - 4
apt-pkg/packagemanager.cc

@@ -666,10 +666,6 @@ pkgPackageManager::DoInstallPostFork(int statusFd)
       if(goResult == false) 
 	 return Failed;
 
-      // if all was fine update the state file
-      if(Res == Completed) {
-	 Cache.writeStateFile(NULL);
-      }
       return Res;
 };
 

+ 10 - 2
debian/changelog

@@ -1,4 +1,4 @@
-apt (UNRELEASED) experimental; urgency=low
+apt (0.7.15~exp3) UNRELEASED; urgency=low
 
   [Daniel Burrows]
   * apt-pkg/deb/dpkgpm.cc:
@@ -8,7 +8,15 @@ apt (UNRELEASED) experimental; urgency=low
       concern.  If it becomes a concern, we can sort the static array and
       use std::equal_range().  (Closes: #499322)
 
- --
+  [ Michael Vogt ]
+  * apt-pkg/packagemanager.cc, apt-pkg/deb/dpkgpm.cc:
+    - move the state file writting into the Go() implementation
+      of dpkgpm (closes: #498799)
+  * apt-pkg/algorithms.cc:
+    - fix simulation performance drop (thanks to Ferenc Wagner
+      for reporting the issue)
+
+ -- Michael Vogt <mvo@udebian.org>  Wed, 01 Oct 2008 18:09:49 +0200
 
 apt (0.7.15~exp2) experimental; urgency=low