Comment 0 for bug 1795614

Julian Andres Klode (juliank) wrote :

PackageKit needs an adjustment for frontend locking, so it does not release the frontend lock during dpkg invocations, but only the normal dpkg lock.

[Test case]
1. Install a package
2. Modify prerm to sleep
3. Remove package via pkcon and check that packagekitd process holds lock-frontend and dpkg holds lock

[Regression potential]
Changing the code to call UnLockInner() vs UnLock() makes it do less steps and only release "lock" as before, and not "lock-frontend". That should not be causing any regressions.

The patch also adds a call to LockInner() after the dpkg execution to make it reacquire "lock", this could fail. It should not have much impact however, as it only affects a single transaction AFAICT. It does reduce the risk of some frontend not implementing frontend locking from racing while we still hold the frontend lock, though.