PDA

View Full Version : [IDEA] GUI-based dpkg lock resolution


aysiu
October 18th, 2007, 07:14 PM
Summary:
A fully GUI (GTK or QT) dialogue that will allow users who are trying to run multiple instances of apt simultaneously to properly kill one instance of it and use the desired one.

Scope and Use Cases:
Maria opens up Add/Remove to install some programs. Then a notification appears on the panel saying there are updates to be installed. She clicks on the updates to be installed and then gets an error message saying Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable). She gets confused by this message and doesn't know how to fix it.

Implementation Plan:
Create an extension of apt that allows one instance to override another instance and let the user decide: Add/Remove needs to be closed before you can install updates to your system. Do you want to close Add/Remove and discard changes or install updates after Add/Remove is finished?
* Close Add/Remove
* Install updates later

nesl247
October 18th, 2007, 08:25 PM
I like the idea to a point. But I think that instead of doing that, it should attempt to wait until the other instance is completed, or that the other instance could have the new instance's commands appended.

Zdravko
October 19th, 2007, 08:08 AM
Yeah, nesl is right.

coolen
November 1st, 2007, 12:48 AM
To my knowledge, neither Add/Remove nor Software Updates will lock APT. Only when you attempt to add/remove/update will it do that.
Perhaps a kind of queue could be implemented for APT? As long as the actual package operations aren't occuring in parallel, it should be safe. Let the user select their options, ask for confirmation for whatever's needed, and when they go to install, inform them that another package manager is running, and theirs will continue afterwards (with an option to remove their operation from the queue).