Bug#902260: modemmanager: postrm script broken: --runtime cannot be used with unmask

2018-06-28 Thread Carl Suster

From the recent changelog of systemd:

systemd (239-3) unstable; urgency=medium

   * Revert "systemctl: when removing enablement or mask symlinks, 
cover both /run and /etc"
 We currently have packages in the archive which use "systemctl 
--runtime unmask" and are broken by this change. This is a intermediate 
step until it is clear whether upstream will revert this commit or 
whether we will have to update affected packages to deal with this 
changed behaviour.

See #902287 and https://github.com/systemd/systemd/issues/9393

-- Michael Biebl  Wed, 27 Jun 2018 14:46:06 +0200

Looks like this package is also affected by #902287



Bug#902260: modemmanager: postrm script broken: --runtime cannot be used with unmask

2018-06-23 Thread Carl Suster
Package: modemmanager
Version: 1.7.990-1
Severity: important

Dear Maintainer,

When trying to remove the modemmanager package dpkg reports an error:

Performing actions...
(Reading database ... 370879 files and directories currently installed.)
Removing modemmanager (1.7.990-1) ...
--runtime cannot be used with unmask
dpkg: error processing package modemmanager (--remove):
 installed modemmanager package post-removal script subprocess returned 
error exit status 1
Errors were encountered while processing:
 modemmanager
E: Sub-process /usr/bin/dpkg returned an error code (1)

The first few lines of the postrm script are:

#!/bin/sh
set -e

# drop the temporary mask from prerm
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
systemctl unmask --runtime ModemManager
fi

And checking the man page of systemctl under --runtime:

--runtime
When used with set-property, make changes only temporarily, so that
they are lost on the next reboot.

[...]

Note: this option cannot be used with disable, unmask, preset, or
preset-all, because those operations sometimes need to remove
symlinks under /etc to have the desired effect, which would cause a
persistent change.

So it seems that the script is indeed incorrect in its usage of that flag.


-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.16.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages modemmanager depends on:
ii  libc6  2.27-3
ii  libglib2.0-0   2.56.1-2
ii  libgudev-1.0-0 232-2
pn  libmbim-glib4  
pn  libmbim-proxy  
ii  libmm-glib01.7.990-1
ii  libpolkit-gobject-1-0  0.105-20
pn  libqmi-glib5   
pn  libqmi-proxy   
ii  libsystemd0239-1

Versions of packages modemmanager recommends:
ii  usb-modeswitch  2.5.2+repack0-2

modemmanager suggests no packages.

-- no debconf information