Error while updating using muon: Another application seems to be using the package system at this time

Bug #976159 reported by Robert Simmons on 2012-04-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QApt
Fix Released
High
qapt (Ubuntu)
Undecided
Unassigned

Bug Description

Muon refuses to perform the current update to my system. I am trying to let it perform the April KDE updates from the kubuntu backports archive. When I click "Full Upgrade" then "Apply Changes" the update fails with the following error:
"Another application seems to be using the package system at this time. You must close all other package managers before you will be able to install or remove any packages."

I ran "ps -efl | egrep 'apt|dpkg'" and the only process that shows up is:
4 S root 2393 1 0 80 0 - 20790 poll_s 15:20 ? 00:00:00 /usr/bin/python /usr/share/apt-xapian-index/update-apt-xapian-index-dbus

Killing that process does not help.

I have tried the following, all fail to correct the problem:
1) sudo dpkg --configure -a
2) Logout
3) Reboot
4) All possible combinations of the above.

The only way to get past this is to use terminal:
sudo apt-get update
sudo apt-get upgrade

After that, the problem goes away.

Robert Simmons (rsimmons0) wrote :

Created attachment 70217
the error message

Muon refuses to perform the current update to my system. I am trying to let it perform the April KDE updates from the kubuntu backports archive. When I click "Full Upgrade" then "Apply Changes" the update fails with the following error:
"Another application seems to be using the package system at this time. You must close all other package managers before you will be able to install or remove any packages."

I ran "ps -efl | egrep 'apt|dpkg'" and the only process that shows up is:
4 S root 2393 1 0 80 0 - 20790 poll_s 15:20 ? 00:00:00 /usr/bin/python /usr/share/apt-xapian-index/update-apt-xapian-index-dbus

Killing that process does not help.

I have tried the following, all fail to correct the problem:
1) sudo dpkg --configure -a
2) Logout
3) Reboot
4) All possible combinations of the above.

The only way to get past this is to use terminal:
sudo apt-get update
sudo apt-get upgrade

After that, the problem goes away.

*** This bug has been marked as a duplicate of bug 285787 ***

affects: kdebase-workspace → qapt
affects: kde-workspace (Ubuntu) → qapt (Ubuntu)

Ah, well, bug 285787 was half of it. The other half is that when you try to mark a single package for upgrade when it has dependencies that will need upgraded that need other dependencies upgraded (basically a 2 or 3-deep "need upgraded" chain), APT will fail to upgrade the package and puts an error on its error stack.

The method that Muon uses to tell the QApt Worker which packages to commit uses a single-mark system for each of the packages being changed, which unfortunately uncovers this bug.

In the case of upgrades, the APT functions for marking upgrades resolve the dependency issues when we hit the upgrade button in Muon, so the other I updated the problem resolution for marking individual upgrades to match that of the APT upgrade functions. (Basically, if marking everything in the list of upgrades sent to the QApt worker resolves the problem manually, then delete the error of APT's error stack.

Changed in qapt (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qapt - 1.3.1-0ubuntu2

---------------
qapt (1.3.1-0ubuntu2) precise; urgency=low

  * Cherry-pick several patches from the 1.3 branch: (LP: #976159)
    - Add fix_misreported_marking_errors.diff to stop marking errors being
      reported as lock errors.
    - Add fix_worker_upgrade_marking.diff, which uses a more conservative
      problem resolution method to fix marking issues that occur while
      marking single packages for upgrade, as well as fixes an issue where
      the worker would not clear errors caused by marking issues that had
      been fixed manually.
 -- Jonathan Thomas <email address hidden> Sat, 07 Apr 2012 19:48:44 -0400

Changed in qapt (Ubuntu):
status: Fix Committed → Fix Released

The problem is that an error was being reported incorrectly as a locking error. Why then were there no errors at all reported when I used "sudo apt-get upgrade"? Wouldn't there still have been an error reported by that command, just not a locking error?

See comment 2. :)

I just went through the following routine:

The only way to get past this is to use terminal:
sudo apt-get update
sudo apt-get upgrade

And likewise:
After that, the problem goes away.

Changed in qapt:
importance: Unknown → High
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.