summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-09-01 16:09:48 +0200
committerMichael Vogt <mvo@debian.org>2014-10-08 17:48:44 +0200
commit9227645d6d355f9f4332f400b8d58c8fa8f1e899 (patch)
tree9dbfb00ab73fc9f560be03e1f79dac69d5922e5e /apt-pkg/deb/deblistparser.cc
parent180b693262d71381d650d10c3f95a5a70553f40f (diff)
Update Status field values handling
Remove long obsolete (hold, hold-reinstreq, removal-failed) or just wrong (post-inst-failed vs postinst-failed) values, that have been autoconverted by dpkg at run-time to their new equivalents, so there should not be any such instance in any recent system (removal-failed since dpkg 1.1.4 in Apr 1996, hold and hold-reinstreq since dpkg 1.2.0 in May 1996). dpkg even stopped doing the mapping in 1.15.4 and 1.15.8 respectively. At the same time sort the list in the same order as they appear in the dpkg code.
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 8311b5d7d..4eef66c2b 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -338,13 +338,9 @@ unsigned short debListParser::VersionHash()
/* Status lines are of the form,
Status: want flag status
want = unknown, install, hold, deinstall, purge
- flag = ok, reinstreq, hold, hold-reinstreq
- status = not-installed, unpacked, half-configured,
- half-installed, config-files, post-inst-failed,
- removal-failed, installed
-
- Some of the above are obsolete (I think?) flag = hold-* and
- status = post-inst-failed, removal-failed at least.
+ flag = ok, reinstreq
+ status = not-installed, config-files, half-installed, unpacked,
+ half-configured, triggers-awaited, triggers-pending, installed
*/
bool debListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
pkgCache::VerIterator &Ver)
@@ -401,15 +397,13 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
// Process the flag field
WordList StatusList[] = {{"not-installed",pkgCache::State::NotInstalled},
+ {"config-files",pkgCache::State::ConfigFiles},
+ {"half-installed",pkgCache::State::HalfInstalled},
{"unpacked",pkgCache::State::UnPacked},
{"half-configured",pkgCache::State::HalfConfigured},
- {"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},
+ {"installed",pkgCache::State::Installed},
{NULL, 0}};
if (GrabWord(string(Start,I-Start),StatusList,Pkg->CurrentState) == false)
return _error->Error("Malformed 3rd word in the Status line");