Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2001602

Summary: PackageKit fails to refresh its cache after "pkcon refresh force"
Product: Red Hat Enterprise Linux 9 Reporter: Tomáš Bajer <tbajer>
Component: PackageKitAssignee: Richard Hughes <rhughes>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: klember
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-06 07:27:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomáš Bajer 2021-09-06 14:20:06 UTC
Description of problem:
PackageKit-1.2.4-2.el9.x86_64 fails to refresh data loaded in cache after changing configurations in repo.


Version-Release number of selected component (if applicable):
PackageKit-1.2.4-2.el9.x86_64
libdnf-0.63.0-4.el9.x86_64

How reproducible:


Steps to Reproduce:
(0. Disable all repos, create one always available repo and one testrepo with skip_if_unavailable=1)

1.sed -i '/skip_if_unavailable/d' /etc/dnf/dnf.conf

cat > /etc/yum.repos.d/testrepo-skip.repo <<EOF
[testrepo-skip]
name=testrepo-skip
enabled=0
baseurl=http://127.0.0.1:8000/testrepo-skip
gpgcheck=0
EOF


PKG_MGR_TO_TEST="PackageKit"

function enableOnlyRepos() {
	sed -i 's/enabled=.*/enabled=0/' /etc/yum.repos.d/testrepo-skip.repo
	while [ "$1" != "" ]; do
		sed -i 's/enabled=0/enabled=1/' /etc/yum.repos.d/testrepo-$1.repo
		shift
	done
        if [ "$PKGMGR" == "PackageKit" ]; then
	    pkcon refresh force || true
        fi

}
2.  for PKGMGR in $PKG_MGR_TO_TEST; do
            rlRun "enableOnlyRepos available skip"
            rlRun "pkcon -y install dummypkg" 0
3.

Actual results:
:: [ 06:37:34 ] :: [  BEGIN   ] :: Running 'enableOnlyRepos available skip'
Refreshing cache              [=========================]         
Finished                      [=========================]         
Fatal error: Failed to check for authentication: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
:: [ 06:37:34 ] :: [   PASS   ] :: Command 'enableOnlyRepos available skip' (Expected 0, got 0)

:: [ 10:11:53 ] :: [  BEGIN   ] :: Running 'testpkgInstall PackageKit -y install dummypkg'
Transaction:	Resolving
Status: 	Waiting in queue
Status: 	Starting
Status: 	Querying
Status: 	Loading cache
Status: 	Downloading repository information
Status: 	Loading cache
Percentage:	90
Percentage:	100
Transaction:	Installing
Status: 	Waiting in queue
Status: 	Waiting for authentication
Status: 	Finished
Results:
Fatal error: Failed to check for authentication: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
:: [ 10:11:53 ] :: [   FAIL   ] :: Command 'testpkgInstall PackageKit -y install dummypkg' (Expected 0, got 7)



Expected results:
:: [ 08:20:33 ] :: [  BEGIN   ] :: Running 'enableOnlyRepos available skip'
Refreshing cache              [=========================]         
Starting                      [=========================]         
Querying                      [=========================]         
Loading cache                 [=========================]         
Finished                      [=========================]         
:: [ 08:20:34 ] :: [   PASS   ] :: Command 'enableOnlyRepos available skip' (Expected 0, got 0)
:: [ 08:20:34 ] :: [  BEGIN   ] :: Running 'testpkgInstall PackageKit -y install dummypkg'
Resolving                     [=========================]         
Installing                    [=========================]         
Loading cache                 [=========================]         
Finished                      [=========================]         
Installing                    [=========================]         
Installing packages           [=========================]         
Finished                      [=========================]         
dummypkg-1.0-1.noarch
:: [ 08:20:35 ] :: [  BEGIN   ] :: Running 'rpm -e dummypkg'
:: [ 08:20:35 ] :: [   PASS   ] :: Command 'rpm -e dummypkg' (Expected 0, got 0)
:: [ 08:20:35 ] :: [   PASS   ] :: Command 'testpkgInstall PackageKit -y install dummypkg' (Expected 0, got 0)


Additional info:
While dnf and microdnf correctly install the dummypkg after enableing the skip of unavailable testrepo if there is other repo available, PackageKit fails with "Fatal error: Failed to check for authentication: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable" when using "pkcon refresh force" to force it to load new repo configuration. Then it proceeds to to fail to install the dummypkg.

Comment 2 Richard Hughes 2021-10-05 10:58:44 UTC
> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable

Does packagekitd fail to start? What are the journal messages please?

Comment 6 RHEL Program Management 2023-03-06 07:27:15 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.