Bug 14838 - pkcon and pk-application want to remove not installed packages
Summary: pkcon and pk-application want to remove not installed packages
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Richard Hughes
QA Contact:
Depends on:
Reported: 2008-03-05 11:23 UTC by Marcin Banasiak
Modified: 2008-03-17 06:44 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Patch for gnome-packagekit (1.66 KB, patch)
2008-03-05 11:23 UTC, Marcin Banasiak
Details | Splinter Review

Description Marcin Banasiak 2008-03-05 11:23:38 UTC
Created attachment 14867 [details] [review]
Patch for gnome-packagekit

As I understand pk-reference.html, Get Requires should return installed and available packages, but when it works in this way, the dialog displayed in pk-application during remove action has incorrect content. It tells me that packages which are marked as available have to be removed too.

I have checked pkcon and there is the same problem. Here is pkcon output:

[mb@saturn ~]$ pkcon get requires "liferea;1.4.11-2;i686;installed"
available liferea-gtkhtml i686 1.4.11-2 all-avail GtkHTML module for Liferea
installed liferea-mozilla i686 1.4.11-2 installed Mozilla HTML browser module for Liferea
get-requires runtime was 0.1 seconds

[mb@saturn ~]$ pkcon remove "liferea;1.4.11-2;i686;installed"
get-requires runtime was 0.1 seconds
The following packages have to be removed:
0	liferea-gtkhtml-1.4.11-2
1	liferea-mozilla-1.4.11-2
Okay to remove additional packages? [N/y] N
Command failed
[mb@saturn ~]$

I prepared patch for gnome-packagekit. For pkcon should be very similar.
Comment 1 Richard Hughes 2008-03-06 14:59:50 UTC
Well, you've pointed out an ambiguity in the spec! Personally I think we should break Api andadd a filter to GetRequires so we can filter this in the backend, as theres no point updating the packagelists and working it out on the repo when we only want the local result.
Comment 2 Richard Hughes 2008-03-16 16:57:54 UTC
Marcin, can you change your backend to use the filter parameter for GetRequires please? Then this bug should be good to close. Thanks.
Comment 3 Marcin Banasiak 2008-03-17 05:46:33 UTC
OK, I have fixed poldek backend and now it seems to work correctly.
Comment 4 Richard Hughes 2008-03-17 06:44:03 UTC
Excellent, thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.