Hi On Sun, Jan 11, 2015 at 07:35:26PM +0100, Andreas Beckmann wrote: > Package: mock > Version: 1.2.3-1 > Severity: serious > User: debian...@lists.debian.org > Usertags: piuparts > > Hi, > > during a test with piuparts I noticed your package fails to upgrade from > 'sid'. > It installed fine in 'sid', but after the upgrade to eperimental the > system is broken. > > >From the attached log (scroll to the bottom...): > > Selecting previously unselected package mock. > Preparing to unpack .../archives/mock_1.1.33-1_all.deb ... > Unpacking mock (1.1.33-1) ... > > Setting up mock (1.1.33-1) ... > > Preparing to unpack .../archives/mock_1.2.3-1_all.deb ... > Unpacking mock (1.2.3-1) over (1.1.33-1) ... > Setting up mock (1.2.3-1) ... > Installing new version of config file /etc/mock/epel-5-i386.cfg ... > [...] > Installing new version of config file /etc/mock/site-defaults.cfg ... > Installing new version of config file /etc/pam.d/mock ... > dpkg-statoverride: warning: --update given but /var/lib/mock does not exist > dpkg-statoverride: warning: --update given but /var/cache/mock does not > exist > > The following NEW packages will be installed: > libapt-pkg4.15 > The following packages will be upgraded: > apt dash findutils grep insserv libdbus-1-3 libsystemd0 libudev1 systemd > systemd-sysv udev > 11 upgraded, 1 newly installed, 0 to remove and 9 not upgraded. > Need to get 7522 kB of archives. > After this operation, 7868 kB of additional disk space will be used. > [...] > debconf: delaying package configuration, since apt-utils is not installed > Fetched 7522 kB in 0s (39.8 MB/s) > E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file > or directory) > dpkg: unrecoverable fatal error, aborting: > unknown group 'mock' in statoverride file > E: Sub-process /usr/bin/dpkg returned an error code (2) > > > The postinst script uses two different variables for the group name: > MOCK and GROUP, but only one of them is defined!
The attached patch fixes this for me. Cheers, -- Guido
>From 06d5407f9d70304648f3ec1e31efd1d1a6348573 Mon Sep 17 00:00:00 2001 Message-Id: <06d5407f9d70304648f3ec1e31efd1d1a6348573.1447436148.git....@sigxcpu.org> From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org> Date: Fri, 13 Nov 2015 18:30:37 +0100 Subject: [PATCH] Fix postinst by adding the required dirs and using the correct variable --- debian/dirs | 2 ++ debian/postinst | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 debian/dirs diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..1cefb5b --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +/var/lib/mock +/var/cache/mock diff --git a/debian/postinst b/debian/postinst index 4797e60..edc4aed 100644 --- a/debian/postinst +++ b/debian/postinst @@ -6,8 +6,8 @@ GROUP=mock case "$1" in configure) - if ! getent group $MOCK >/dev/null ; then - groupadd --system $MOCK + if ! getent group $GROUP >/dev/null ; then + groupadd --system $GROUP fi for dir in /var/lib/mock /var/cache/mock; do if ! dpkg-statoverride --list $dir >/dev/null; then -- 2.6.2