Already installed / upgrade
From /usr/bin/deb-systemd-helper
$dsh_state
/var/lib/systemd/deb-systemd-helper-enabled/run-qemu.mount.dsh-also
$statefile
/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/run-qemu.mount
Both exist - so the linking is skipped - correct
Without being installed
debian_installed($scriptname) is false
=> I need to debug this in freshly unpacked state
State checks:
root@i-kvm:~# ll /var/lib/systemd/deb-systemd-helper-enabled/run-qemu.mount.dsh-also /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/run-qemu.mount
-rw-r--r-- 1 root root 0 Jun 24 10:10 /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/run-qemu.mount
-rw-r--r-- 1 root root 59 Jun 24 10:10 /var/lib/systemd/deb-systemd-helper-enabled/run-qemu.mount.dsh-also
Install without dependencies (make things more complex)
Turns out that on-install `deb-systemd-helper enable 'run-qemu.mount'` would get it enabled.
But it does not happen.
After install the state files are in place and so nothing happens anymore (intentionally)
So is "enable" not called on first install?
Debugging the maintscript itself says it would call it.
$ sudo DPKG_MAINTSCRIPT_PACKAGE=qemu-block-extra /var/lib/dpkg/info/qemu-block-extra.postinst configure 1:6.0+dfsg-1~ubuntu1~impishppa20
+ [ configure = configure ]
+ deb-systemd-helper debian-installed run-qemu.mount
+ deb-systemd-helper update-state run-qemu.mount
+ [ configure = configure ]
+ deb-systemd-helper enable run-qemu.mount
+ [ -d /run/systemd/system ]
+ systemctl --system daemon-reload
+ deb-systemd-invoke start run-qemu.mount
run-qemu.mount is a disabled or a static unit, not starting it.
+ exit 0
A following call to enable does not enable it.
$ sudo DPKG_MAINTSCRIPT_PACKAGE=qemu-block-extra deb-systemd-helper enable run-qemu.mount
At this point no state files are in place yet.
Already installed / upgrade deb-systemd- helper systemd/ deb-systemd- helper- enabled/ run-qemu. mount.dsh- also systemd/ deb-systemd- helper- enabled/ multi-user. target. wants/run- qemu.mount
From /usr/bin/
$dsh_state
/var/lib/
$statefile
/var/lib/
Both exist - so the linking is skipped - correct
Without being installed installed( $scriptname) is false
debian_
=> I need to debug this in freshly unpacked state
State checks: systemd/ deb-systemd- helper- enabled/ run-qemu. mount.dsh- also /var/lib/ systemd/ deb-systemd- helper- enabled/ multi-user. target. wants/run- qemu.mount systemd/ deb-systemd- helper- enabled/ multi-user. target. wants/run- qemu.mount systemd/ deb-systemd- helper- enabled/ run-qemu. mount.dsh- also
root@i-kvm:~# ll /var/lib/
-rw-r--r-- 1 root root 0 Jun 24 10:10 /var/lib/
-rw-r--r-- 1 root root 59 Jun 24 10:10 /var/lib/
Install without dependencies (make things more complex)
$ sudo dpkg --ignore- depends= qemu-block- extra --purge qemu-block-extra depends= qemu-block- extra --install qemu-block- extra_1% 3a6.0+dfsg- 1~ubuntu1~ impishppa20_ amd64.deb
$ sudo dpkg --ignore-
Call to debhelper with debug enabled T_PACKAGE= qemu-block- extra perl -d /usr/bin/ deb-systemd- helper enable run-qemu.mount
$ sudo DPKG_MAINTSCRIP
Combined into: depends= qemu-block- extra --purge qemu-block-extra depends= qemu-block- extra --unpack qemu-block- extra_1% 3a6.0+dfsg- 1~ubuntu1~ impishppa20_ amd64.deb systemd/ deb-systemd- helper- enabled/ run-qemu. mount.dsh- also /var/lib/ systemd/ deb-systemd- helper- enabled/ multi-user. target. wants/run- qemu.mount T_PACKAGE= qemu-block- extra perl -d /usr/bin/ deb-systemd- helper enable run-qemu.mount
$ sudo dpkg --ignore-
$ sudo dpkg --ignore-
$ ls -laF /var/lib/
$ sudo systemctl status run-qemu.mount
$ sudo DPKG_MAINTSCRIP
DB<1> b enable
DB<2> b make_systemd_links
Turns out that on-install `deb-systemd-helper enable 'run-qemu.mount'` would get it enabled.
But it does not happen.
After install the state files are in place and so nothing happens anymore (intentionally)
So is "enable" not called on first install?
Debugging the maintscript itself says it would call it.
$ sudo DPKG_MAINTSCRIP T_PACKAGE= qemu-block- extra /var/lib/ dpkg/info/ qemu-block- extra.postinst configure 1:6.0+dfsg- 1~ubuntu1~ impishppa20
+ [ configure = configure ]
+ deb-systemd-helper debian-installed run-qemu.mount
+ deb-systemd-helper update-state run-qemu.mount
+ [ configure = configure ]
+ deb-systemd-helper enable run-qemu.mount
+ [ -d /run/systemd/system ]
+ systemctl --system daemon-reload
+ deb-systemd-invoke start run-qemu.mount
run-qemu.mount is a disabled or a static unit, not starting it.
+ exit 0
A following call to enable does not enable it. T_PACKAGE= qemu-block- extra deb-systemd-helper enable run-qemu.mount
$ sudo DPKG_MAINTSCRIP
At this point no state files are in place yet.