[Bug 1974196] Re: Installing libudev1 on a new Jammy installation uninstalls many packages.
Tully
1974196 at bugs.launchpad.net
Wed Jun 8 18:52:48 UTC 2022
I completely understand that moving the apt-get update && apt upgrade to
the beginning of the manual would be better. The problem is that this
can completely destroy an ubuntu system installation if done without
following that best practice. We had user reports which is why we have
made sure with the conflicts to not cause this.
The above reproduction is focused on isolating the minimum set. You can
reproduce it with a larger system using one of the older tags
https://hub.docker.com/layers/udevdebug/tfoote/udevdebug/1/images/sha256-de4ca1bfb4aef4ab5b5909ea60814d33101aa3b855eb2a41dddb54dda146817c?context=explore
docker run -ti --rm tfoote/udevdebug:1 bash -c 'apt-get update && apt-
get install libudev1'
And you'll get it removing a large fraction of essential ubuntu and make your system unusable.
docker run -ti --rm tfoote/udevdebug:1 bash -c 'apt-get update && apt-get install libudev1'
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [198 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [12.7 kB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main DEP-11 48x48 Icons [5952 B]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/main DEP-11 64x64 Icons [8219 B]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [2600 B]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [188 kB]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f Metadata [464 B]
Get:11 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [81.0 kB]
Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [1076 B]
Get:13 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [228 B]
Get:14 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy/main amd64 c-n-f Metadata [30.3 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 c-n-f Metadata [488 B]
Get:17 http://archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata [8372 B]
Get:19 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [348 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [91.0 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy-updates/main DEP-11 48x48 Icons [25.0 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy-updates/main DEP-11 64x64 Icons [37.1 kB]
Get:23 http://archive.ubuntu.com/ubuntu jammy-updates/main DEP-11 64x64 at 2 Icons [29 B]
Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [4840 B]
Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [209 kB]
Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [460 B]
Get:27 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [142 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [115 kB]
Get:29 http://archive.ubuntu.com/ubuntu jammy-updates/universe DEP-11 48x48 Icons [35.1 kB]
Get:30 http://archive.ubuntu.com/ubuntu jammy-updates/universe DEP-11 64x64 Icons [46.5 kB]
Get:31 http://archive.ubuntu.com/ubuntu jammy-updates/universe DEP-11 64x64 at 2 Icons [29 B]
Get:32 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [2292 B]
Get:33 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [4653 B]
Get:34 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f Metadata [232 B]
Get:35 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f Metadata [112 B]
Get:36 http://archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f Metadata [116 B]
Get:37 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [2016 B]
Get:38 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [1122 B]
Get:39 http://archive.ubuntu.com/ubuntu jammy-backports/universe DEP-11 48x48 Icons [2686 B]
Get:40 http://archive.ubuntu.com/ubuntu jammy-backports/universe DEP-11 64x64 Icons [4938 B]
Get:41 http://archive.ubuntu.com/ubuntu jammy-backports/universe DEP-11 64x64 at 2 Icons [29 B]
Get:42 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f Metadata [216 B]
Get:43 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 2216 kB in 2s (1031 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
apg aptdaemon-data apturl-common btrfs-progs busybox-initramfs colord-data cryptsetup cryptsetup-bin cryptsetup-initramfs dctrl-tools
dmeventd dmraid dns-root-data dnsmasq-base dpkg-repack gir1.2-accountsservice-1.0 gir1.2-adw-1 gir1.2-gck-1 gir1.2-gcr-3 gir1.2-gdm-1.0
gir1.2-geoclue-2.0 gir1.2-gnomebluetooth-3.0 gir1.2-goa-1.0 gir1.2-graphene-1.0 gir1.2-gtk-4.0 gir1.2-gweather-3.0 gir1.2-json-1.0
gir1.2-mutter-10 gir1.2-nm-1.0 gir1.2-nma-1.0 gir1.2-rsvg-2.0 gir1.2-snapd-1 gir1.2-timezonemap-1.0 gir1.2-upowerglib-1.0
gir1.2-vte-2.91 gir1.2-xkl-1.0 gkbd-capplet gnome-bluetooth-3-common gnome-control-center-faces gnome-online-accounts gnome-session-bin
gnome-session-common gnome-shell-common gnome-startup-applications gparted-common gstreamer1.0-pipewire initramfs-tools
initramfs-tools-bin initramfs-tools-core klibc-utils kpartx kpartx-boot libaio1 libcairo-gobject-perl libcairo-perl libcanberra-pulse
libcolord-gtk1 libcolorhug2 libdebian-installer4 libdevmapper-event1.02.1 libdmraid1.0.0.rc16 libdpkg-perl libextutils-depends-perl
libfile-fcntllock-perl libfprint-2-2 libfreerdp-server2-2 libgdm1 libgles2 libglib-object-introspection-perl libglib-perl
libgnome-bluetooth-3.0-13 libgnomekbd-common libgnomekbd8 libgoa-backend-1.0-1 libgsound0 libgssdp-1.2-0 libgtk3-perl libgupnp-1.2-1
libgupnp-av-1.0-3 libgupnp-dlna-2.0-4 libklibc liblvm2cmd2.03 libmutter-10-0 libndp0 libnetplan0 libnma-common libnma0 libpcre2-32-0
libpkcs11-helper1 libplymouth5 librygel-core-2.6-2 librygel-db-2.6-2 librygel-renderer-2.6-2 librygel-server-2.6-2 libsysmetrics1
libtcl8.6 libteamdctl0 libtimezonemap-data libtimezonemap1 libvncserver1 libxcb-res0 libxkbcommon-x11-0 libxklavier16 linux-base lvm2
mobile-broadband-provider-info mutter-common openvpn patch power-profiles-daemon ppp pptp-linux python3-certifi python3-dateutil
python3-debconf python3-defer python3-icu python3-idna python3-macaroonbakery python3-netifaces python3-pam python3-protobuf
python3-pymacaroons python3-requests python3-rfc3339 python3-software-properties python3-tz rdate rygel squashfs-tools
switcheroo-control tcl tcl8.6 thin-provisioning-tools ubiquity-casper ubiquity-ubuntu-artwork ubuntu-advantage-desktop-daemon
unattended-upgrades update-notifier-common usb-modeswitch usb-modeswitch-data wireless-regdb xwayland
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
gnome-settings-daemon gnome-settings-daemon-common libnm0 libnss-systemd libpam-systemd libsystemd0 python3-distupgrade
python3-software-properties systemd systemd-sysv systemd-timesyncd ubuntu-release-upgrader-core udev
Suggested packages:
usbguard systemd-container policykit-1
The following packages will be REMOVED:
aptdaemon apturl brltty colord dbus-user-session fprintd gdm3 gnome-control-center gnome-initial-setup gnome-remote-desktop gnome-shell
gnome-shell-extension-appindicator gnome-shell-extension-desktop-icons-ng gnome-shell-extension-ubuntu-dock gparted
gstreamer1.0-packagekit language-selector-gnome libpam-fprintd modemmanager nautilus-share netplan.io network-manager
network-manager-config-connectivity-ubuntu network-manager-gnome network-manager-openvpn network-manager-openvpn-gnome
network-manager-pptp network-manager-pptp-gnome packagekit packagekit-tools pkexec plymouth plymouth-label plymouth-theme-spinner
plymouth-theme-ubuntu-text policykit-1 polkitd python3-aptdaemon python3-aptdaemon.gtk3widgets rtkit snapd software-properties-common
software-properties-gtk systemd-oomd ubiquity ubiquity-frontend-gtk ubuntu-desktop ubuntu-desktop-minimal ubuntu-minimal
ubuntu-release-upgrader-gtk ubuntu-session ubuntu-standard update-manager update-notifier
The following packages will be upgraded:
gnome-settings-daemon gnome-settings-daemon-common libnm0 libnss-systemd libpam-systemd libsystemd0 libudev1 python3-distupgrade
python3-software-properties systemd systemd-sysv systemd-timesyncd ubuntu-release-upgrader-core udev
14 upgraded, 0 newly installed, 54 to remove and 126 not upgraded.
Need to get 7844 kB of archives.
After this operation, 159 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
Based on your above statement, I could speculate that if there's not a direct "essential" dependency on the package the apt resolver doesn't detect do the extra logic for removing essential packages. And that logic isn't triggered for indirect removals either.
We understand that our conflicts statements are not "correct" however
they are the only way that we could reliably prevent people from
destroying their fresh ubuntu installation when they installed ROS
packages with the above dependency. So that it was not possible to
reproduce ros2#1272 for our users.
We did this as a short term workaround because the consequences are so
severe. (We have never successfully recovered any of our real computers
which tried this.) And we're hoping that there will be an upstream
resolution prior to our pinned conflict version being out of date. And
we worked to make sure to reproduce it with purely upstream packages to
be able to report it.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1974196
Title:
Installing libudev1 on a new Jammy installation uninstalls many
packages.
Status in systemd package in Ubuntu:
Confirmed
Bug description:
On an Ubuntu 22.04 desktop system created using the current
installation image without enabling package updates over the network,
installing the package libudev1 results in a large number of critical
packages being removed and rendering the system essentially unusable.
https://github.com/tfoote/udevdebug/blob/main/Dockerfile is a Dockerfile which also demonstrates the issue.
Building the image, which will install udev 249.11-0ubuntu3 and init 1.62, and then running `apt install libudev1` in the generated image results in
The following packages will be REMOVED:
libnss-systemd libpam-systemd systemd-timesyncd udev
The following packages will be upgraded:
libudev1
This is completely prevented by ensuring that updates are installed from the jammy-updates repository before installing any additional packages and that is almost certainly the correct thing to do. But this is a punishing result for such a mistake.
I would expect the installation to either force the upgrade of the
other systemd packages or refuse to install libudev1 at the incorrect
version relative to the other systemd packages until the system is
upgraded.
We found this out via a user report for ROS 2 Humble which is
releasing on top of Ubuntu 22.04 next week:
https://github.com/ros2/ros2/issues/1272
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1974196/+subscriptions
More information about the foundations-bugs
mailing list