On 2015-10-07 02:23, Guillem Jover wrote: > Hi! > > On Wed, 2015-10-07 at 01:10:33 +0200, Andreas Beckmann wrote: >> Package: dpkg >> Version: 1.18.3 >> Severity: serious > >> dpkg does not always properly pass the old version number when >> calling "postinst configure" on package upgrades, sometimes there >> is either no or an empty argument. > > That's to be expected, the second argument is the last version that > got configured, if no version has ever been configured then the > argument is omitted. Checking now, this is documented in Debian > policy ยง6.7.
> I've not checked the logs, but I'd assume that in the problematic case > the package has never been configured before, and as such the bug here > is on that specific package. That is unlikely. Both tests start from the same chroot tarball (debootstrapped about a month ago) Right before packing it up the status was listed as ii systemd 215-17+deb8u2 amd64 system and service manager so I assume it has been configured during the debootstrap run. If I enter that chroot with pbuilder login, the status of the systemd package is listed as Package: systemd Status: install ok installed Priority: important Section: admin Installed-Size: 13838 Maintainer: Debian systemd Maintainers <pkg-systemd-maintain...@lists.alioth.debian.org> Architecture: amd64 Version: 215-17+deb8u2 Depends: libacl1 (>= 2.2.51-8), libaudit1 (>= 1:2.2.1), libblkid1 (>= 2.19.1), libcap2 (>= 1:2.10), libcryptsetup4 (>= 2:1.4.3), libkmod2 (>= 5~), libpam0g (>= 0.99.7.1), libselinux1 (>= 2.1.9), libsystemd0 (= 215-17+deb8u2), util-linux (>= 2.19.1-2), mount (>= 2.21), initscripts (>= 2.88dsf-53.2), sysv-rc, udev (>= 208-8), acl, adduser, libcap2-bin Pre-Depends: libc6 (>= 2.17), libgcrypt20 (>= 1.6.1), liblzma5 (>= 5.1.1alpha+20120614), libselinux1 (>= 1.32) Recommends: libpam-systemd, dbus Suggests: systemd-ui Breaks: lsb-base (<< 4.1+Debian4), lvm2 (<< 2.02.104-1), systemd-shim (<< 8-2) Conflicts: klogd Conffiles: /etc/dbus-1/system.d/org.freedesktop.hostname1.conf f55c94d000b5d62b5f06d38852977dd1 /etc/dbus-1/system.d/org.freedesktop.locale1.conf 5893ab03e7e96aa3759baceb4dd04190 /etc/dbus-1/system.d/org.freedesktop.login1.conf 96bf488f3da8f0ca813cc78e71eeb605 /etc/dbus-1/system.d/org.freedesktop.machine1.conf d658acaf7192de735ab798c58ab149ae /etc/dbus-1/system.d/org.freedesktop.systemd1.conf 46533268285a0df22b1f1667ddc05642 /etc/dbus-1/system.d/org.freedesktop.timedate1.conf 682369fbf3de26b21e775732c89a2bbe /etc/pam.d/systemd-user aebb8b8a2c698614b00961f327a683ef /etc/systemd/bootchart.conf 838a83315ad2f9d4c4b7f20b7475ba28 /etc/systemd/journald.conf 51f19202dcc5aff6d2c3448dbf92f354 /etc/systemd/logind.conf 747ae2312b6922546190bf806d8d12be /etc/systemd/resolved.conf 81a9c57d4eb587decc49040595674c5a /etc/systemd/system.conf 3d0e13a72d72acb55409a831b72a15e6 /etc/systemd/timesyncd.conf 605e4f25097b8ea22f2f5cb3fde3f13c /etc/systemd/user.conf 9eaad8fbb7bb6230d4b28abb76b4e81c Description: system and service manager systemd is a replacement for sysvinit. It is dependency-based and >> I have two cases where an 'apt-get dist-upgrade' from jessie to >> stretch calls 'systemd.postinst configure' differently: >> * a minimal jessie chroot (incorrect behavior) >> * a minimal jessie chroot + bash-completion (correct behavior) and starting from that chroot.tgz I can reproduce the two upgrade paths with the differing behavior manually: apt-get install bash-completion # only for the "correct" one sed -i s/jessie/stretch/ /etc/apt/sources.list apt-get update apt-get dist-upgrade If the postinst is invoked correctly the configuration of systemd ends with the removal of an obsolete conffile: ... Unpacking systemd (226-3) over (215-17+deb8u2) ... Setting up util-linux (2.27-3) ... Setting up systemd (226-3) ... ... Removing obsolete conffile /etc/dbus-1/system.d/org.freedesktop.machine1.conf ... ... If the postinst is incorrectly invoked like it were an initial install, the obsolete conffile removal is missing. if I start with apt-get install bash-completion apt-get purge bash-completion I also get into the incorrect behavior. You can find the chroot at people.debian.org: ~anbe/jessie_amd64.tar.gz You may have to nuke the proxy setting in /etc/apt/apt.conf.d/piuparts to test this yourself. Andreas