ASP: asp-post-apt hook fails if previous invocation is still running
Steps to reproduce the error:
apt update
apt install -y popularity-contest
apt install -y cowsay
After the first apt install
command, the asp-post-apt
hook is run, which starts a transient service named tails-additional-software-post-apt-hook
. That service shows a desktop notification (at least some cases) and doesn't exit until that notification is dismissed.
The second apt install
command tries to start another transient service of the same name, which fails if the previously started service is still running:
Failed to start transient service unit: Unit tails-additional-software-post-apt-hook.service already exists.
E: Problem executing scripts DPkg::Post-Invoke '/usr/local/lib/additional-software/asp-post-apt'
E: Sub-process returned an error code