discover: check package status before trying to install/update it

Authored by alnikiforov on Oct 15 2019, 7:34 AM.



With latest changes to packagekit, it may now return more packages from 'pkcon get-updates' command with new statuses: "removed" or "obsoleted". This change is needed to filter such packages since Discover is using list of packages similar to the output of mentioned command but ignores package statuses. Otherwise, Discover would try to install all packages, including removed and obsoleted, and fail while trying to resolve such transaction due to package conflicts, if there are such packages present.

packagekit changes:

Diff Detail

R134 Discover Software Store
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
alnikiforov created this revision.Oct 15 2019, 7:34 AM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 15 2019, 7:34 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
alnikiforov requested review of this revision.Oct 15 2019, 7:34 AM
apol accepted this revision.Oct 15 2019, 10:39 AM

Please submit to master.


Could you drop the unnecessary parenthesis?

This revision is now accepted and ready to land.Oct 15 2019, 10:39 AM
alnikiforov marked an inline comment as done.
In D24653#547385, @apol wrote:

Please submit to master.

I've updated patch and removed additional parenthesis in condition. But I don't see how I can submit this change to repository, I probably don't have permissions for that action.

This revision was automatically updated to reflect the committed changes.