Suggested workaround:

* Create a script that tries to lock the apt locks, until it succeeds, then 
exits
* Make that run in ExecStart in a service WantedBy=shutdown.target

Probably some issues regarding to services and stuff, but better than
nothing.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1820886

Title:
  Potential inconsistency due to system halt/reboot being allowed when
  package installation in progress

Status in apt package in Ubuntu:
  Triaged

Bug description:
  [System]
  Any current Ubuntu Desktop/Server supported release (Trusty, Xenial, Bionic, 
Cosmic).

  [Impact]
  Package installation turns into an inconsistent state if system is rebooted 
in the middle of an apt install/upgrade.

  [Test Case]
  1. User1 at Ubuntu box issues "sudo apt-get upgrade";
  2. User2 at Ubuntu box issues "shutdown -r" or reboots it using the GUI;
  3. System reboots and potentially turns into an inconsistent state.

  [Remarks]
  APT should automatically inhibit system halts/reboots while packages being 
installed/removed. A similar behavior to what is shown by unattended-upgrades.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1820886/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to