Bug#679728: systemd: diversion removed in postinst, should be removed in preinst
Tollef Fog Heen, 2012-07-02 22:52+0200: That's quite odd. I think I have clues about that. In the postinst, you call dpkg-divert this way: dpkg-divert --remove --package systemd --rename \ --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions Well, according to dpkg-divert(8) manpage, it should rather be something like: dpkg-divert --package systemd --rename \ --remove /lib/lsb/init-functions Indeed: --package is an option with one argument; --rename is an option with zero argument; --remove is the action with one argument. The order matters (options first, action last), and there should be not additionnal argument. Contrary to the way you are calling dpkg-divers: --remove takes one argument (not zero); --divert is not needed for removal; * the additionnal argument /lib/lsb/init-functions, which I guess was taken from the command introducing the diversion, is an implicit --add action, which is certainly not wanted here. I did not test it, but correcting that call may be enough to solve that bug. In addition, for more reliability, I suggest that, instead of testing the version from which one is upgrading systemd, you rather test whether or not a diversion is present. In other words, test the situation you intend to change, not the version that is supposed to provide that situation: if [ $1 = configure ] \ LC_ALL=C dpkg-divert --list /lib/lsb/init-functions | \ grep -q 'by systemd$'; then dpkg-divert --package systemd --rename \ --remove /lib/lsb/init-functions fi Librement, -- ,--. : /` ) Tanguy Ortolo xmpp:tan...@ortolo.eu | `-'Debian Developer irc://irc.oftc.net/Tanguy \_ signature.asc Description: Digital signature
Bug#679728: systemd: diversion removed in postinst, should be removed in preinst
2012/7/2 Tollef Fog Heen tfh...@err.no: That's quite odd. Can you please provide the output of «grep systemd /var/log/dpkg.log»? See below. I've reinstalled «systemd» this morning on my workstation. Cheers -- 2012-07-02 10:55:30 upgrade systemd-gui:i386 44-2 44-3 2012-07-02 10:55:30 status half-configured systemd-gui:i386 44-2 2012-07-02 10:55:30 status unpacked systemd-gui:i386 44-2 2012-07-02 10:55:30 status half-installed systemd-gui:i386 44-2 2012-07-02 10:55:30 status half-installed systemd-gui:i386 44-2 2012-07-02 10:55:30 status half-installed systemd-gui:i386 44-2 2012-07-02 10:55:30 status unpacked systemd-gui:i386 44-3 2012-07-02 10:55:30 status unpacked systemd-gui:i386 44-3 2012-07-02 10:55:31 upgrade libsystemd-daemon0:i386 44-2 44-3 2012-07-02 10:55:31 status half-configured libsystemd-daemon0:i386 44-2 2012-07-02 10:55:31 status unpacked libsystemd-daemon0:i386 44-2 2012-07-02 10:55:31 status half-installed libsystemd-daemon0:i386 44-2 2012-07-02 10:55:31 status half-installed libsystemd-daemon0:i386 44-2 2012-07-02 10:55:31 status unpacked libsystemd-daemon0:i386 44-3 2012-07-02 10:55:31 status unpacked libsystemd-daemon0:i386 44-3 2012-07-02 10:55:32 upgrade libsystemd-id128-0:i386 44-2 44-3 2012-07-02 10:55:32 status half-configured libsystemd-id128-0:i386 44-2 2012-07-02 10:55:32 status unpacked libsystemd-id128-0:i386 44-2 2012-07-02 10:55:32 status half-installed libsystemd-id128-0:i386 44-2 2012-07-02 10:55:32 status half-installed libsystemd-id128-0:i386 44-2 2012-07-02 10:55:32 status unpacked libsystemd-id128-0:i386 44-3 2012-07-02 10:55:32 status unpacked libsystemd-id128-0:i386 44-3 2012-07-02 10:55:33 upgrade libsystemd-journal0:i386 44-2 44-3 2012-07-02 10:55:33 status half-configured libsystemd-journal0:i386 44-2 2012-07-02 10:55:33 status unpacked libsystemd-journal0:i386 44-2 2012-07-02 10:55:33 status half-installed libsystemd-journal0:i386 44-2 2012-07-02 10:55:33 status half-installed libsystemd-journal0:i386 44-2 2012-07-02 10:55:33 status unpacked libsystemd-journal0:i386 44-3 2012-07-02 10:55:33 status unpacked libsystemd-journal0:i386 44-3 2012-07-02 10:55:34 upgrade libsystemd-login0:i386 44-2 44-3 2012-07-02 10:55:34 status half-configured libsystemd-login0:i386 44-2 2012-07-02 10:55:34 status unpacked libsystemd-login0:i386 44-2 2012-07-02 10:55:34 status half-installed libsystemd-login0:i386 44-2 2012-07-02 10:55:34 status half-installed libsystemd-login0:i386 44-2 2012-07-02 10:55:34 status unpacked libsystemd-login0:i386 44-3 2012-07-02 10:55:34 status unpacked libsystemd-login0:i386 44-3 2012-07-02 10:55:34 upgrade libpam-systemd:i386 44-2 44-3 2012-07-02 10:55:34 status half-configured libpam-systemd:i386 44-2 2012-07-02 10:55:35 status unpacked libpam-systemd:i386 44-2 2012-07-02 10:55:35 status half-installed libpam-systemd:i386 44-2 2012-07-02 10:55:35 status half-installed libpam-systemd:i386 44-2 2012-07-02 10:55:35 status half-installed libpam-systemd:i386 44-2 2012-07-02 10:55:35 status unpacked libpam-systemd:i386 44-3 2012-07-02 10:55:35 status unpacked libpam-systemd:i386 44-3 2012-07-02 10:55:35 upgrade systemd:i386 44-2 44-3 2012-07-02 10:55:35 status half-configured systemd:i386 44-2 2012-07-02 10:55:36 status unpacked systemd:i386 44-2 2012-07-02 10:55:36 status half-installed systemd:i386 44-2 2012-07-02 10:55:36 status half-installed systemd:i386 44-2 2012-07-02 10:55:37 status half-installed systemd:i386 44-2 2012-07-02 10:55:37 status unpacked systemd:i386 44-3 2012-07-02 10:55:37 status unpacked systemd:i386 44-3 2012-07-02 11:11:40 status unpacked libpam-systemd:i386 44-3 2012-07-02 11:11:41 remove libpam-systemd:i386 44-3 none 2012-07-02 11:11:41 status half-installed libpam-systemd:i386 44-3 2012-07-02 11:11:41 status half-installed libpam-systemd:i386 44-3 2012-07-02 11:11:41 status config-files libpam-systemd:i386 44-3 2012-07-02 11:11:41 status config-files libpam-systemd:i386 44-3 2012-07-02 11:11:41 status config-files libpam-systemd:i386 44-3 2012-07-02 11:11:41 status not-installed libpam-systemd:i386 none 2012-07-02 11:11:42 status unpacked systemd-gui:i386 44-3 2012-07-02 11:11:42 remove systemd-gui:i386 44-3 none 2012-07-02 11:11:42 status half-installed systemd-gui:i386 44-3 2012-07-02 11:11:42 status half-installed systemd-gui:i386 44-3 2012-07-02 11:11:42 status config-files systemd-gui:i386 44-3 2012-07-02 11:11:42 status config-files systemd-gui:i386 44-3 2012-07-02 11:11:42 status config-files systemd-gui:i386 44-3 2012-07-02 11:11:42 status not-installed systemd-gui:i386 none 2012-07-02 11:11:42 status unpacked systemd:i386 44-3 2012-07-02 11:11:42 remove systemd:i386 44-3 none 2012-07-02 11:11:42 status half-installed systemd:i386 44-3 2012-07-02 11:11:42 status half-installed systemd:i386 44-3 2012-07-02 11:11:43 status config-files systemd:i386 44-3 2012-07-02 11:11:43 purge systemd:i386 44-3 none 2012-07-02 11:11:43 status config-files systemd:i386 44-3 2012-07-02 11:11:43 status config-files systemd:i386
Bug#679728: systemd: diversion removed in postinst, should be removed in preinst
]] Teodor MICU Hi, 2012/7/2 Tollef Fog Heen tfh...@err.no: That's quite odd. Can you please provide the output of «grep systemd /var/log/dpkg.log»? See below. I've reinstalled «systemd» this morning on my workstation. Ah, it looks like it never actually got to the configure step of systemd. Does that sound correct, and is the diversion correctly removed now? If not, could you please try downgrading to 44-2 and then upgrading and verifying that the diversion is gone? Cheers, -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its friends are -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679728: systemd: diversion removed in postinst, should be removed in preinst
2012/7/3 Tollef Fog Heen tfh...@err.no: Ah, it looks like it never actually got to the configure step of systemd. Does that sound correct, and is the diversion correctly removed now? If not, could you please try downgrading to 44-2 and then upgrading and verifying that the diversion is gone? 1) On package removal (44-3) the diversion is still there. root@frost:~# ls -l /lib/lsb/ total 16 drwxr-xr-x 2 root root 4096 Jul 3 12:29 init-functions.d -rw-r--r-- 1 root root 11433 May 30 17:01 init-functions.systemd root@frost:~# dpkg -S /lib/lsb/init-functions.systemd diversion by systemd from: /lib/lsb/init-functions diversion by systemd to: /lib/lsb/init-functions.systemd ii libsystemd-daemon0:i 44-3i386 ii libsystemd-login0:i3 44-3i386 un systemd none 2) I've downgraded «libsystemd-daemon0 libsystemd-login0» to version 44-2 and installed again «systemd» (all 44-2 via some APT pin). Selecting previously unselected package systemd. Unpacking systemd (from .../archives/systemd_44-2_i386.deb) ... Leaving 'diversion of /lib/lsb/init-functions to /lib/lsb/init-functions.systemd by systemd' The result is that now I have a «/lib/lsb/init-functions» file back (with different content than init-functions.systemd). root@frost:~# ls -l /lib/lsb/ total 20 -rw-r--r-- 1 root root 2370 Jun 5 23:53 init-functions drwxr-xr-x 2 root root 4096 Jul 3 12:29 init-functions.d -rw-r--r-- 1 root root 11433 May 30 17:01 init-functions.systemd 3) Removed APT pin and upgrade. Setting up systemd (44-3) ... Removing 'diversion of /lib/lsb/init-functions to /lib/lsb/init-functions.systemd by systemd' Setting up libpam-systemd:i386 (44-3) ... Now the content is different: -rw-r--r-- 1 root root 11433 May 30 17:01 init-functions drwxr-xr-x 2 root root 4096 Jul 3 12:40 init-functions.d The diversion is gone: lsb-base: /lib/lsb/init-functions I have no clue how previously there was no «init-functions» file on the system. This morning I had to rescue the system due to many many init.d scripts failing because of this. A quickly fixed it by copying the init-functions.systemd file. Cheers -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679728: systemd: diversion removed in postinst, should be removed in preinst
Diversion is not removed at all on package removal: | root@frost:~# ls -hl /lib/lsb/ | total 16K | drwxr-xr-x 2 root root 4.0K Jul 2 11:11 init-functions.d | -rw-r--r-- 1 root root 12K May 30 17:01 init-functions.systemd | root@frost:~# dpkg -S /lib/lsb/init-functions.d | lsb-base: /lib/lsb/init-functions.d | root@frost:~# dpkg -S /lib/lsb/init-functions.systemd | diversion by systemd from: /lib/lsb/init-functions | diversion by systemd to: /lib/lsb/init-functions.systemd | | root@frost:~# dpkg -l '*systemd*' | ii libsystemd-daemon0:i 44-3i386 | ii libsystemd-login0:i3 44-3i386 | un systemd none Cheers -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679728: systemd: diversion removed in postinst, should be removed in preinst
]] Teodor MICU Diversion is not removed at all on package removal: | root@frost:~# ls -hl /lib/lsb/ | total 16K | drwxr-xr-x 2 root root 4.0K Jul 2 11:11 init-functions.d | -rw-r--r-- 1 root root 12K May 30 17:01 init-functions.systemd | root@frost:~# dpkg -S /lib/lsb/init-functions.d | lsb-base: /lib/lsb/init-functions.d | root@frost:~# dpkg -S /lib/lsb/init-functions.systemd | diversion by systemd from: /lib/lsb/init-functions | diversion by systemd to: /lib/lsb/init-functions.systemd | | root@frost:~# dpkg -l '*systemd*' | ii libsystemd-daemon0:i 44-3i386 | ii libsystemd-login0:i3 44-3i386 | un systemd none Did you upgrade to 44-3 before removing it or not? Cheers, -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its friends are -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679728: systemd: diversion removed in postinst, should be removed in preinst
2012/7/2 Tollef Fog Heen tfh...@err.no: Did you upgrade to 44-3 before removing it or not? Yes, I've upgraded almost all packages (including systemd) and then reported Bug#679873: lsb-base: Can't open /lib/lsb/init-functions. Later I've uninstalled systemd packages to work around the problem, but I've discovered that systemd removal is not enough. Cheers -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679728: systemd: diversion removed in postinst, should be removed in preinst
]] Teodor MICU 2012/7/2 Tollef Fog Heen tfh...@err.no: Did you upgrade to 44-3 before removing it or not? Yes, I've upgraded almost all packages (including systemd) and then reported Bug#679873: lsb-base: Can't open /lib/lsb/init-functions. Later I've uninstalled systemd packages to work around the problem, but I've discovered that systemd removal is not enough. That's quite odd. Can you please provide the output of «grep systemd /var/log/dpkg.log»? -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its friends are -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679728: systemd: diversion removed in postinst, should be removed in preinst
Package: systemd Version: 44-2 Severity: serious This breaks other packages installed in the same apt run. 00:12 uau Mithrandir: with latest debian systemd package, /lib/lsb/init-functions doesn't exist between unpacking and postinst that removes diversion 00:12 uau /etc/init.d/vsftpd: 22: .: Can't open /lib/lsb/init-functions - vsftpd prerm executed during that interval -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing'), (50, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.4.0 (SMP w/4 CPU cores) Locale: LANG=nb_NO.UTF-8, LC_CTYPE=nb_NO.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages systemd depends on: ii dpkg 1.16.4.3 ii initscripts 2.88dsf-22.1 ii libacl1 2.2.51-8 ii libaudit01:1.7.18-1.1 ii libc62.13-33 ii libcap2 1:2.22-1 ii libcryptsetup4 2:1.4.3-2 ii libdbus-1-3 1.6.0-1 ii libkmod2 8-2 ii liblzma5 5.1.1alpha+20120614-1 ii libpam0g 1.1.3-7.1 ii libselinux1 2.1.9-5 ii libsystemd-daemon0 44-2 ii libsystemd-id128-0 44-2 ii libsystemd-journal0 44-2 ii libsystemd-login044-2 ii libudev0 175-3.1 ii libwrap0 7.6.q-23 ii udev 175-3.1 ii util-linux 2.20.1-5.1 Versions of packages systemd recommends: ii libpam-systemd 44-2 Versions of packages systemd suggests: ii python2.7.3~rc2-1 ii python-cairo 1.8.8-1+b2 ii python-dbus 1.1.0-1 pn systemd-gui none -- no debconf information -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its friends are -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org