Bug#720574: libapt-pkg4.12: Inconsistency in reporting whether the package "apt" is essential
Package: libapt-pkg4.12
Version: 0.9.7.9
Severity: normal
Hi,
libapt-pkg has some code (introduced in commit 945099df10 I think) to
treat the package "apt" as a special case and describe it as
"Essential", so that a program using that library gets a result like this:
$ python3
Python 3.2.3 (default, Feb 20 2013, 14:44:27)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import apt
>>> cache = apt.Cache()
>>> cache['apt'].essential
True
>>>
But according to "dpkg -s apt" or "apt-cache show apt", apt is not
essential, i.e. there is no "Essential: yes" field.
I'm sure the special case code is there for a reason, but isn't it a bug
for the library and the tools to return contradictory results?
Many thanks.
-- System Information:
Debian Release: 7.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages apt depends on:
ii debian-archive-keyring 2012.4
ii gnupg 1.4.12-7+deb7u1
ii libapt-pkg4.12 0.9.7.9
ii libc6 2.13-38
ii libgcc1 1:4.7.2-5
ii libstdc++6 4.7.2-5
apt recommends no packages.
Versions of packages apt suggests:
pn apt-doc <none>
ii aptitude 0.6.8.2-1
ii dpkg-dev 1.16.10
ii python-apt 0.8.8.2
ii synaptic 0.75.13
ii xz-utils 5.1.1alpha+20120614-2
-- debconf-show failed
Reply to: