mirror of
https://github.com/cockpit-project/cockpit.git
synced 2026-11-03 21:49:50 -09:00
packagelib: Avoid running into locking issues with apt
In our CI packagekit holds a lock on /var/lib/apt/lists/lock while we try to run apt-get clean. Make sure PackageKit is stopped before we invoke any apt commands. Only on Debian/Ubuntu is the package manager cache shared with PackageKit on all other OSes PackageKit uses a separate cache directory.
This commit is contained in:
parent
a177b46792
commit
55e444a819
1 changed files with 3 additions and 0 deletions
|
|
@ -53,6 +53,9 @@ class PackageCase(MachineCase):
|
|||
self.machine.execute("nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1")
|
||||
self.addCleanup(self.machine.execute, "nmcli con delete fake")
|
||||
|
||||
# Stop Packagekit to not run into locking issues with apt
|
||||
self.machine.execute("systemctl stop packagekit; systemctl reset-failed packagekit || true")
|
||||
|
||||
self.addCleanup(self.machine.execute, "systemctl stop packagekit; systemctl reset-failed packagekit || true")
|
||||
|
||||
# disable all existing repositories to avoid hitting the network
|
||||
|
|
|
|||
Loading…
Reference in a new issue