Bug 1121656 - get-packages fails after repository is enabled
Summary: get-packages fails after repository is enabled
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 22
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-21 13:41 UTC by Michal Minar
Modified: 2015-05-29 18:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-05-29 18:11:26 UTC

Attachments (Terms of Use)

Description Michal Minar 2014-07-21 13:41:58 UTC
Description of problem:
  After "pkcon repo-enable <repository>" is used, "pkcon get-packages" stops working.

Version-Release number of selected component (if applicable):
  PackageKit-0.9.4-1.fc22.x86_64 and PackageKit-debuginfo-0.9.3-1.fc21.x86_64

How reproducible:
  Any time.

Steps to Reproduce:
1. Ensure that "pkcon get-packages" works (you'll get a list of packages).
2. Enable any currently disabled repository with "pkcon repo-enable" (rawhide in my case).
3. Run "pkcon get-packages" again.

Actual results:
pkcon produces following error:
  pkcon get-packages                                                                                                                                                                                                                                                                                                         
  Getting packages              [=========================]         
  Loading cache                 [=========================]         
  Finished                      [=========================]         
  Fatal error: Failed to ensure 0ad as source rawhide not found (0 sources loaded)

Expected results:
  Second invocation of "pkcon get-packages" produces a list of packages.

Additional info:
  Once the PackageKit service is restarted, it works again.

  "dnf list", "dnf list available", "yum list available" all work and produce list of packages while pkcon doesn't.

  It doesn't matter whether I use pkcon to enable/disable repositories. The same happens even with "yum-config-manager --enable <repo".

Comment 1 Sylvain Pasche 2014-10-14 19:02:03 UTC
I saw the same issue on F21 today. Not only did "pkcon get-packages" fail, but also other pkcon commands. I might also have updated the enabled status of some repositories using an editor.

Comment 2 Michal Minar 2014-10-15 11:38:29 UTC
I think I've fixed the issue with these patches (awaiting review):

 1. https://github.com/miminar/libhif/commit/2daa532b01a9e35b0f74a41df6a260435e7bf022
 2. https://github.com/miminar/PackageKit/commit/b18f783b18c7feaeb639587f99deb552ff9cd3c4


Comment 3 Jaroslav Reznik 2015-03-03 16:08:36 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:

Comment 4 Kalev Lember 2015-05-29 18:11:26 UTC
The two fixes above have both landed in F22; closing the ticket.

Note You need to log in before you can comment on or make changes to this bug.