Code review comment for ~paelzer/ubuntu/+source/qemu:merge-6.0-impish

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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)

 $ sudo dpkg --ignore-depends=qemu-block-extra --purge qemu-block-extra
 $ sudo dpkg --ignore-depends=qemu-block-extra --install qemu-block-extra_1%3a6.0+dfsg-1~ubuntu1~impishppa20_amd64.deb

Call to debhelper with debug enabled
 $ sudo DPKG_MAINTSCRIPT_PACKAGE=qemu-block-extra perl -d /usr/bin/deb-systemd-helper enable run-qemu.mount

Combined into:
$ sudo dpkg --ignore-depends=qemu-block-extra --purge qemu-block-extra
$ sudo dpkg --ignore-depends=qemu-block-extra --unpack qemu-block-extra_1%3a6.0+dfsg-1~ubuntu1~impishppa20_amd64.deb
$ ls -laF /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
$ sudo systemctl status run-qemu.mount
$ sudo DPKG_MAINTSCRIPT_PACKAGE=qemu-block-extra perl -d /usr/bin/deb-systemd-helper enable run-qemu.mount

  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_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.

« Back to merge proposal