[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#793360: apt: APT::Never-MarkAuto-Sections not working as advertised



Package: apt
Version: 1.0.9.6
Severity: normal
User: devel@kali.org
Usertags: origin-kali

There are probably multiple problems but just to prove my case:

$ apt-config dump|grep metapackages
APT::Never-MarkAuto-Sections:: "metapackages";
APT::Never-MarkAuto-Sections:: "restricted/metapackages";
APT::Never-MarkAuto-Sections:: "universe/metapackages";
APT::Never-MarkAuto-Sections:: "multiverse/metapackages";
$ apt-cache show kali-desktop-common|grep -E 'Depends|Section'
Depends: kali-root-login, kali-defaults, kali-menu, kali-debtags, kali-archive-keyring, desktop-base
Section: metapackages

Of those 6 packages, only kali-archive-keyring is already installed.

$ LANG=C sudo apt-get -s -o Debug::pkgDepCache::AutoInstall=true install kali-desktop-common 2>&1 >/dev/null | grep "Setting NOT as auto-installed"
    Setting NOT as auto-installed (direct Depends of pkg in APT::Never-MarkAuto-Sections)

=> only one package is marked as manually installed instead of the the
5 missing dependencies

Trying it out with a real install:
$ sudo apt-mark showmanual >before
$ sudo apt-get -o Debug::pkgDepCache::AutoInstall=true install kali-desktop-common
[...]
$ sudo apt-mark showmanual >after
$ diff -u before after
--- before	2015-07-23 08:44:47.182823170 +0000
+++ after	2015-07-23 08:49:14.712184832 +0000
@@ -13,6 +13,7 @@
 cpio
 cron
 dash
+dconf-tools
 debconf
 debconf-i18n
 debian-archive-keyring
@@ -46,6 +47,7 @@
 john
 john-data
 kali-archive-keyring
+kali-desktop-common
 kmod
 less
 libacl1

And here we see that the package which is marked as manually installed is not
even a direct dependency of kali-desktop-common. It's a dependency of
kali-defaults which is not marked as a metapackage !

$ apt-cache show kali-defaults
Package: kali-defaults
Version: 2.0~16
Architecture: all
Maintainer: Devon Kearns <dookie@kali.org>
Installed-Size: 799
Depends: dconf-gsettings-backend | gsettings-backend, libglib2.0-bin, dconf-tools, gnome-brave-icon-theme
Homepage: http://www.kali.org
Priority: extra
Section: utils
Filename: pool/main/k/kali-defaults/kali-defaults_2.0~16_all.deb
Size: 278164
SHA256: 7a318d8ee97d71e3a25d0925bad6baf40b52be044c03d29895de752d9eae17b2
SHA1: d4bb80391367f4e4e5facc35527098d3579bf678
MD5sum: 609484282a69ca96f6d527e9f37748fa
Description: Kali default settings
 This package implements various default settings
 within Kali.
Description-md5: 39bf1c4ba320c4ada4e9be47c053cad2

But dconf-tools is in section "oldlibs" and that's how it got matched!
$ apt-cache show dconf-tools|grep Section
Section: oldlibs

(I also saw this quickly when using -o Debug::pkgDepCache::Marker=true)

So this is all matching packages not based on the parent that brough the packages in the
set of packages to install but on the package itself.

We want direct dependencies of metapackages to be marked as manually installed:
- when they are installed for the first time
- when they were already installed formerly as automatic dependency
- also when they are pulled by a metapackage which is itself a dependency of
  another metapackage

It would be good to review all those cases to ensure that we fix this comprehensively.

-- System Information:
Debian Release: stretch/sid
  APT prefers squeeze-lts
  APT policy: (500, 'squeeze-lts'), (500, 'oldoldstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages apt depends on:
ii  debian-archive-keyring  2014.3
ii  gnupg                   1.4.19-3
ii  libapt-pkg4.12          1.0.9.10
ii  libc6                   2.19-19
ii  libgcc1                 1:5.1.1-14
ii  libstdc++6              5.1.1-14

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc     <none>
ii  aptitude    0.6.11-1+b1
ii  dpkg-dev    1.18.1
ii  python-apt  1.0.0~beta3
ii  synaptic    0.81.4

-- no debconf information


Reply to: