Behaviour inconsistency between apt and aptitude (on nvidia-related packages)

Boyuan Yang byang at debian.org
Wed Sep 26 15:38:45 BST 2018


Dear all,

I just encountered some weird problem around installing bumblebee-nvidia using 
apt and aptitude on Debian Unstable. Here's what I did:

$ sudo apt purge '*nvidia*'
$ sudo apt autoremove --purge
$ sudo apt update
$ dpkg --print-architecture
amd64
$ dpkg --print-foreign-architectures
i386

For apt:

$ sudo apt install bumblebee-nvidia primus- nvidia-driver-
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'primus' is not installed, so not removed
Package 'nvidia-driver' is not installed, so not removed
The following additional packages will be installed:
  bbswitch-dkms bumblebee dkms glx-alternative-mesa glx-alternative-nvidia 
glx-diversions libegl1-nvidia-legacy-340xx libgl1-nvidia-legacy-340xx-glx
  libnvidia-legacy-340xx-eglcore libnvidia-legacy-340xx-glcore libnvidia-
legacy-340xx-ml1 linux-headers-amd64 nvidia-installer-cleanup nvidia-kernel-
common:i386
  nvidia-legacy-340xx-alternative nvidia-legacy-340xx-driver nvidia-
legacy-340xx-driver-bin nvidia-legacy-340xx-driver-libs nvidia-legacy-340xx-
kernel-dkms
  nvidia-legacy-340xx-kernel-support:i386 nvidia-legacy-340xx-vdpau-driver 
nvidia-modprobe:i386 nvidia-support update-glx xserver-xorg-video-nvidia-
legacy-340xx
Suggested packages:
  python3-apport menu nvidia-driver
Recommended packages:
  virtualgl | primus nvidia-settings-legacy-340xx nvidia-persistenced nvidia-
legacy-340xx-driver-libs-i386 libgles1-nvidia-legacy-340xx libgles2-nvidia-
legacy-340xx
  libnvidia-legacy-340xx-cfg1
The following NEW packages will be installed:
  bbswitch-dkms bumblebee bumblebee-nvidia dkms glx-alternative-mesa glx-
alternative-nvidia glx-diversions libegl1-nvidia-legacy-340xx libgl1-nvidia-
legacy-340xx-glx
  libnvidia-legacy-340xx-eglcore libnvidia-legacy-340xx-glcore libnvidia-
legacy-340xx-ml1 linux-headers-amd64 nvidia-installer-cleanup nvidia-kernel-
common:i386
  nvidia-legacy-340xx-alternative nvidia-legacy-340xx-driver nvidia-
legacy-340xx-driver-bin nvidia-legacy-340xx-driver-libs nvidia-legacy-340xx-
kernel-dkms
  nvidia-legacy-340xx-kernel-support:i386 nvidia-legacy-340xx-vdpau-driver 
nvidia-modprobe:i386 nvidia-support update-glx xserver-xorg-video-nvidia-
legacy-340xx
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 23.7 MB of archives.
After this operation, 137 MB of additional disk space will be used.
Do you want to continue? [Y/n]

And for aptitude:

$ sudo aptitude install bumblebee-nvidia primus- nvidia-driver-
Package primus is not installed, so it will not be removed
Package nvidia-driver is not installed, so it will not be removed
Package primus is not installed, so it will not be removed
Package nvidia-driver is not installed, so it will not be removed
The following NEW packages will be installed:
  bbswitch-dkms{a} bumblebee{a} bumblebee-nvidia dkms{a} glx-alternative-
mesa{a} glx-alternative-nvidia{a} glx-diversions{a} libegl-mesa0:i386{a} 
libegl-nvidia0{a} 
  libegl-nvidia0:i386{a} libegl1:i386{a} libgbm1:i386{a} libgl1-nvidia-glvnd-
glx{a} libgl1-nvidia-glvnd-glx:i386{a} libgles-nvidia2:i386{a} 
libgles2:i386{a} 
  libglx-nvidia0{a} libglx-nvidia0:i386{a} libnvidia-cfg1:i386{a} libnvidia-
egl-wayland1{a} libnvidia-egl-wayland1:i386{a} libnvidia-eglcore{a} 
  libnvidia-eglcore:i386{a} libnvidia-glcore{a} libnvidia-glcore:i386{a} 
libnvidia-ml1{a} libopengl0:i386{a} libvulkan1:i386{a} libwayland-
client0:i386{a} 
  libwayland-server0:i386{a} libxnvctrl0{a} linux-headers-amd64{a} nvidia-
alternative{a} nvidia-driver-libs:i386{a} nvidia-driver-libs-i386:i386{a} 
  nvidia-egl-common{a} nvidia-egl-icd:i386{a} nvidia-egl-wayland-common{a} 
nvidia-egl-wayland-icd:i386{a} nvidia-installer-cleanup{a} nvidia-kernel-
common{a} 
  nvidia-kernel-dkms{a} nvidia-kernel-support{a} nvidia-legacy-check{a} 
nvidia-modprobe{a} nvidia-settings{a} nvidia-support{a} nvidia-vdpau-driver{a} 
  nvidia-vulkan-common{a} nvidia-vulkan-icd{a} nvidia-vulkan-icd:i386{a} 
update-glx{a} xserver-xorg-video-nvidia{a} 
The following packages are RECOMMENDED but will NOT be installed:
  libcuda1 nvidia-driver primus 
0 packages upgraded, 53 newly installed, 0 to remove and 0 not upgraded.
Need to get 49.1 MB of archives. After unpacking 201 MB will be used.
Do you want to continue? [Y/n/?]


(I know that bumblebee is not meant to be used as above, but we are talking 
about dependency handling so it's just an example)

---

As you can see, the behaviour of apt is expected (choosing an dependency from 
alternative list when a dependency "nvidia-driver" is not to be installed) but 
aptitude is giving a weird answer: it just ignored the hard dependnecy that 
"bumblebee-nvidia depends on nvidia-driver | ... " but downgraded this 
dependency to "RECOMMENDED but will NOT be installed". That is really strange 
since aptitude seems to have ignored a hard dependency.

This scenario is a little bit complicated and might not only be related to 
either aptitude or nvidia-related packages so I'm sending email to -devel to 
see if there could be any explanation to it.



(FYI: the output of apt show bumblebee-nvidia:

$ apt show bumblebee-nvidia
Package: bumblebee-nvidia
Version: 3.2.1-17
Priority: optional
Section: contrib/utils
[...]
Depends: bumblebee (= 3.2.1-17), glx-alternative-nvidia (>= 0.6.92), nvidia-
driver | nvidia-legacy-340xx-driver | nvidia-legacy-304xx-driver | nvidia-
kernel-dkms | nvidia-legacy-340xx-kernel-dkms | nvidia-legacy-304xx-kernel-
dkms | nvidia | nvidia-current | nvidia-current-updates | nvidia-driver-binary 
| nvidia-304 | nvidia-304-updates | nvidia-experimental-304 | nvidia-310 | 
nvidia-310-updates | [...]
[...]
)

--
Thanks,
Boyuan Yang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-nvidia-devel/attachments/20180926/810e0bbd/attachment.sig>


More information about the pkg-nvidia-devel mailing list