Muon refuses to uninstall/purge packages. Synaptic can remove them just fine.

Bug #1296711 reported by Fabio Correa
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Muon
Invalid
High
muon (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hello, today I am being redundant by reporting this bug here after I reported it at KDE bugs:

https://bugs.kde.org/show_bug.cgi?id=331730

This bug affects the upcoming Kubuntu 14.04 LTS release.

Since I upgraded Kubuntu from 13.10 to 14.04 Beta, I have seen that Muon 2.1.70 refuses to uninstall/purge packages without justification. The error message is:

"The -pack- package could not be marked for installation or upgrade: "

There is no further explanation in this message. Synaptic is able to remove said packages just fine.

Reproducible: Always

Steps to Reproduce:
1. Open muon and mark a package for uninstall/purge. One of the following examples may work for you: kdepimlibs-kio-plugins, acpid, cdrdao, kdevelop-l10n, kdevelop-php-l10n, gnuplot-qt, uno-libs3. The error message should appear.
2. Close muon and run synaptic.
3. Mark the package for removal/purge.

Actual Results:
Muon fails to mark the packages for removal/purge, while Synaptic offers to mark them along with dependencies that will be removed by the change.
Screenshot: http://goo.gl/ffgVYq

Expected Results:
Muon to resolve dependencies and ask the user whether she wants to uninstall dependencies as well.

Muon Package Manager version 2.1.70
Using KDE Development Platform 4.12.95

Revision history for this message
In , Fabio Correa (facorread) wrote :

Since I upgraded to Kubuntu 14.04, I have seen that Muon refuses to uninstall/purge packages without justification. The error message is:

"The -pack- package could not be marked for installation or upgrade"

Synaptic is able to remove said packages just fine.

Reproducible: Always

Steps to Reproduce:
1. Open muon and select a mark of packages for uninstall/purge. One of the following examples may work for you: kdepimlibs-kio-plugins, kdevelop-l10n, kdevelop-php-l10n, gnuplot-qt, uno-libs3. The error message should appear.
2. Close muon and run synaptic.
3. Mark the package for removal/purge.
Actual Results:
Muon fails to mark the packages for removal/purge, while Synaptic marks them.

Expected Results:
Muon to resolve dependencies and ask me whether I want to uninstall dependencies as well.

Fabio Correa (facorread)
description: updated
description: updated
Revision history for this message
Harald Sitter (apachelogger) wrote :

Closing in favor of upstream bug report.

Changed in muon (Ubuntu):
status: New → Invalid
Changed in muon:
importance: Unknown → High
status: Unknown → New
Revision history for this message
In , Fabio Correa (facorread) wrote :

This bug persists on 2.2.0 on KDE 4.13.

Revision history for this message
In , Victor (blindvic) wrote :
Revision history for this message
In , HinzundKunz (martin-tlustos) wrote :

Same here.

Revision history for this message
In , Saurav Sengupta (saurav-sengupta-id) wrote :

Same problem. apt-get works correctly.

Revision history for this message
In , Harald Sitter (apachelogger) wrote :

I think(tm) I fixed this bug the other week in qapt git, if anyone wants to build master and try that would be really great.

Revision history for this message
In , Victor (blindvic) wrote :

I received updates in Kubuntu:
libqapt (2.1.70-0ubuntu4.2) trusty; urgency=medium

  * Add upstream_fix-package-remove-resolver.diff LP: #1358291
    ensure package resolution happens after cache is marked

Installed them and restarted the computer. The problem still persists.

Revision history for this message
In , Harald Sitter (apachelogger) wrote :

Please check that the test case here: https://bugs.launchpad.net/ubuntu/+source/libqapt/+bug/1358291/comments/2 is what you experience and whether the test case actually succeeds with the patched version.

Revision history for this message
In , Victor (blindvic) wrote :

Ok, sometimes it works, sometimes not: http://www.youtube.com/watch?v=E_3O01iNlw0

Revision history for this message
In , Harald Sitter (apachelogger) wrote :

Does it always fail for bluez-alsa? (i.e. would it fail if you try to remove it right after starting muon?) If not please file a new bug because what you are seeing is the cache getting confused.

Changed in muon:
status: New → Incomplete
Revision history for this message
In , Aleix Pol (aleixpol-kde) wrote :

*** Bug 333673 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Victor (blindvic) wrote :

The problem still exists in the same way as here: http://www.youtube.com/watch?v=E_3O01iNlw0

1. Open Muon and fiter packages by "Installed" status
2. Select a package that other packages depend on (for example in my Kubuntu 14.10 I selected package `baloo` on which package `baloo4` depends). Right click -> "Mark for removal"
3. Click "Unmark all"
4. Select package `baloo4` (the one that depends on the package you just tried to remove). Right click -> "Mark for removal"
5. You get a popup window with this message: "The "baloo4" package could not be marked for installation or upgrade:"

Revision history for this message
In , Carlo Vanini (silhusk) wrote :

Created attachment 96661
reset the flag to show the problem

I was able to reproduce the bug as described by Victor with the packages "aptitude" and its dependency "aptitude-common", and will use them as an example in the discussion below.

* We start with both packages installed.
* By requesting the removal of "aptitude", Package::setRemove() (in libqapt) will try to resolve any dependency problem arising. To do this it also calls pkgProblemResolver::Protect() (in libapt-pkg).
This causes "aptitude" to be marked as "Protected" in the depCache.
* When unmarking "aptitude" muon uses Package::setKeep() to unmark the package.
* When we try to remove "aptitude-common" Package::setRemove() uses pkgProblemResolver again to resolve dependences. But apparently the resolver will not touch "aptitude" because the "Protected" flag is still in place.

I attach a patch *against libqapt* to prove the concept, but it is a hacky workaround. It changes what should be an internal flag of apt-pkg. On the other hand I see no other way to change it.
Does the resolver really need that flag in the cache?

A different point is, why does the error message give no reason?
The dialog box is shown because the depCache correctly reports 1 broken package, i.e. "aptitude". But Package::brokenReason() is called on "aptitude-common", which has no reason to be broken.
Is this a bug too? not sure.

Revision history for this message
In , Andrew-crouthamel (andrew-crouthamel) wrote :

Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!

Revision history for this message
In , Andrew-crouthamel (andrew-crouthamel) wrote :

Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!

Changed in muon:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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