浏览代码

* apt-pkg/pkgcache.cc:
- do not run "dpkg --configure pkg" if pkg is in trigger-awaited
state (LP: #322955)

Michael Vogt 17 年之前
父节点
当前提交
71a9e7cf8b
共有 2 个文件被更改,包括 10 次插入3 次删除
  1. 7 3
      apt-pkg/pkgcache.cc
  2. 3 0
      debian/changelog

+ 7 - 3
apt-pkg/pkgcache.cc

@@ -274,9 +274,13 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const
       return NeedsUnpack;
    
    if (Pkg->CurrentState == pkgCache::State::UnPacked ||
-       Pkg->CurrentState == pkgCache::State::HalfConfigured ||
-       Pkg->CurrentState == pkgCache::State::TriggersPending ||
-       Pkg->CurrentState == pkgCache::State::TriggersAwaited)
+       Pkg->CurrentState == pkgCache::State::HalfConfigured) ||
+      //we don't need to care for triggers awaiting packages
+      //dpkg will deal with them automatically when the 
+      //trigger pending action is run (those packages are usually
+      //in half-configured or triggers-pending state)
+      //Pkg->CurrentState == pkgCache::State::TriggersAwaited
+       Pkg->CurrentState == pkgCache::State::TriggersPending)
       return NeedsConfigure;
    
    if (Pkg->CurrentState == pkgCache::State::HalfInstalled ||

+ 3 - 0
debian/changelog

@@ -38,6 +38,9 @@ apt (0.7.21) UNRELEASED; urgency=low
   * [ABI break] merge support for http redirects, thanks to
     Jeff Licquia and Anthony Towns
   * [ABI break] use int for the package IDs (thanks to Steve Cotton)
+  * apt-pkg/pkgcache.cc:
+    - do not run "dpkg --configure pkg" if pkg is in trigger-awaited
+      state (LP: #322955)
 
   [ Dereck Wonnacott ]
   * apt-ftparchive might write corrupt Release files (LP: #46439)