Bug 2001602 - PackageKit fails to refresh its cache after "pkcon refresh force"
Summary: PackageKit fails to refresh its cache after "pkcon refresh force"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: PackageKit
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard Hughes
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-06 14:20 UTC by Tomáš Bajer
Modified: 2023-03-06 07:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-06 07:27:15 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-96328 0 None None None 2021-09-06 14:23:32 UTC

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.


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