diff options
author | Michael Vogt <egon@bottom> | 2007-09-10 15:59:55 +0200 |
---|---|---|
committer | Michael Vogt <egon@bottom> | 2007-09-10 15:59:55 +0200 |
commit | d4db3e0afce3492d75ab2226393f93e58b0fbfde (patch) | |
tree | b69793fe9c3f46feed2aac101035d7de57744056 | |
parent | 74bc8bb9d60d202a0fffee30785f6f0feb7dc354 (diff) | |
parent | 646501c8fd4c747b8162b87ecaa8406b1509be84 (diff) |
* dpkg-triggers: Deal properly with new package states.
-rw-r--r-- | apt-pkg/algorithms.cc | 2 | ||||
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 2 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 10 | ||||
-rw-r--r-- | apt-pkg/pkgcache.cc | 6 | ||||
-rw-r--r-- | apt-pkg/pkgcache.h | 3 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | doc/cache.sgml | 2 |
7 files changed, 24 insertions, 4 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index b21fcbb2f..62727a852 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -257,6 +257,8 @@ bool pkgApplyStatus(pkgDepCache &Cache) re-unpacked (probably) */ case pkgCache::State::UnPacked: case pkgCache::State::HalfConfigured: + case pkgCache::State::TriggersAwaited: + case pkgCache::State::TriggersPending: if ((I->CurrentVer != 0 && I.CurrentVer().Downloadable() == true) || I.State() != pkgCache::PkgIterator::NeedsUnpack) Cache.MarkKeep(I, false, false); diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 074abea6d..896d4d6d8 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -293,6 +293,8 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator Pkg, {"installed",pkgCache::State::Installed}, {"half-installed",pkgCache::State::HalfInstalled}, {"config-files",pkgCache::State::ConfigFiles}, + {"triggers-awaited",pkgCache::State::TriggersAwaited}, + {"triggers-pending",pkgCache::State::TriggersPending}, {"post-inst-failed",pkgCache::State::HalfConfigured}, {"removal-failed",pkgCache::State::HalfInstalled}, {}}; diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index bb7e4b40a..36086d72e 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -518,7 +518,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) // map the dpkg states to the operations that are performed // (this is sorted in the same way as Item::Ops) - static const struct DpkgState DpkgStatesOpMap[][5] = { + static const struct DpkgState DpkgStatesOpMap[][7] = { // Install operation { {"half-installed", N_("Preparing %s")}, @@ -529,12 +529,20 @@ bool pkgDPkgPM::Go(int OutStatusFd) { {"unpacked",N_("Preparing to configure %s") }, {"half-configured", N_("Configuring %s") }, +#if 0 + {"triggers-awaited", N_("Processing triggers for %s") }, + {"triggers-pending", N_("Processing triggers for %s") }, +#endif { "installed", N_("Installed %s")}, {NULL, NULL} }, // Remove operation { {"half-configured", N_("Preparing for removal of %s")}, +#if 0 + {"triggers-awaited", N_("Preparing for removal of %s")}, + {"triggers-pending", N_("Preparing for removal of %s")}, +#endif {"half-installed", N_("Removing %s")}, {"config-files", N_("Removed %s")}, {NULL, NULL} diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 7e3b9d78c..133899a27 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -49,7 +49,7 @@ pkgCache::Header::Header() /* Whenever the structures change the major version should be bumped, whenever the generator changes the minor version should be bumped. */ - MajorVersion = 6; + MajorVersion = 7; MinorVersion = 0; Dirty = false; @@ -274,7 +274,9 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const return NeedsUnpack; if (Pkg->CurrentState == pkgCache::State::UnPacked || - Pkg->CurrentState == pkgCache::State::HalfConfigured) + Pkg->CurrentState == pkgCache::State::HalfConfigured || + Pkg->CurrentState == pkgCache::State::TriggersPending || + Pkg->CurrentState == pkgCache::State::TriggersAwaited) return NeedsConfigure; if (Pkg->CurrentState == pkgCache::State::HalfInstalled || diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 83b7548a3..59d5003bb 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -81,7 +81,8 @@ class pkgCache enum PkgSelectedState {Unknown=0,Install=1,Hold=2,DeInstall=3,Purge=4}; enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3}; enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2, - HalfInstalled=4,ConfigFiles=5,Installed=6}; + HalfInstalled=4,ConfigFiles=5,Installed=6, + TriggersAwaited=7,TriggersPending=8}; }; struct Flag diff --git a/debian/changelog b/debian/changelog index eadd38eac..d6686ecda 100644 --- a/debian/changelog +++ b/debian/changelog @@ -39,6 +39,9 @@ apt (0.7.7) UNRELEASED; urgency=low * Reset curl options and timestamp between downloaded files. Thanks to Ryan Murray <rmurray@debian.org> for the patch (closes: #437150) + [ Ian Jackson ] + * dpkg-triggers: Deal properly with new package states. + -- Otavio Salvador <otavio@debian.org> Mon, 06 Aug 2007 10:44:53 -0300 apt (0.7.6) unstable; urgency=low diff --git a/doc/cache.sgml b/doc/cache.sgml index e257dcd81..aea5a45c3 100644 --- a/doc/cache.sgml +++ b/doc/cache.sgml @@ -721,6 +721,8 @@ or'd with the current package. #define pkgSTATE_HalfInstalled 4 #define pkgSTATE_ConfigFiles 5 #define pkgSTATE_Installed 6 +#define pkgSTATE_TriggersAwaited 7 +#define pkgSTATE_TriggersPending 8 </example> </sect1> |