Bug 1715209

Summary: packagekit doesn't honor skip_if_unavailable=False for local repositories
Product: Red Hat Enterprise Linux 8 Reporter: Oneata Mircea Teodor <toneata>
Component: PackageKitAssignee: Richard Hughes <rhughes>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: desktop-qa-list, jkoten, klember, ksrot, mdomonko, rhughes, tbowling, toneata
Target Milestone: rcKeywords: ZStream
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1689331 Environment:
Last Closed: 2019-06-10 09:24:27 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:
Bug Depends On: 1689331    
Bug Blocks:    

Description Oneata Mircea Teodor 2019-05-29 19:39:04 UTC
+++ This bug was initially created as a clone of Bug #1689331 +++

Description of problem:

packagekit doesn't honor skip_if_unavailable=False for local repositories

# rpm -q libdnf PackageKit
libdnf-0.22.5-4.el8.x86_64
PackageKit-1.1.12-2.el8.x86_64

# cat /etc/yum.repos.d/modular.repo 
[modular-repo]
name=modular-repo
baseurl=file:///no/such/repo
#baseurl=http://foo.redhat.com/ModRepo
enabled=1
gpgcheck=0
skip_if_unavailable=False

# pkcon install TestA
Resolving                     [=====                    ] (21%)  Command failed: This tool could not find any available package: /no/such/repo was not found

don't give up, try again

# pkcon install TestA
Resolving                     [=========================]         
Finished                      [                         ] (0%)  
The following packages have to be installed:
 TestA-1-2.noarch	TestA Package
Proceed with changes? [N/y] 

The package above comes from a different repo, this should not be happening.

This is not happening for http repos

# cat /etc/yum.repos.d/modular.repo 
[modular-repo]
name=modular-repo
#baseurl=file:///no/such/repo
baseurl=http://foo.redhat.com/ModRepo
enabled=1
gpgcheck=0
skip_if_unavailable=False

# systemctl restart packagekit
# pkcon install TestA
Resolving                     [=====                    ] (21%)  Command failed: This tool could not find any available package: cannot update repo 'modular-repo': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Curl error (6): Couldn't resolve host name for http://foo.redhat.com/ModRepo/repodata/repomd.xml [Could not resolve host: foo.redhat.com]
# pkcon install TestA
Resolving                     [=====                    ] (21%)  Command failed: This tool could not find any available package: cannot update repo 'modular-repo': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Curl error (6): Couldn't resolve host name for http://foo.redhat.com/ModRepo/repodata/repomd.xml [Could not resolve host: foo.redhat.com]
# pkcon install TestA
Resolving                     [=====                    ] (21%)  Command failed: This tool could not find any available package: cannot update repo 'modular-repo': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Curl error (6): Couldn't resolve host name for http://foo.redhat.com/ModRepo/repodata/repomd.xml [Could not resolve host: foo.redhat.com]
# pkcon install TestA
Resolving                     [=====                    ] (21%)  Command failed: This tool could not find any available package: cannot update repo 'modular-repo': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried; Last error: Curl error (6): Couldn't resolve host name for http://foo.redhat.com/ModRepo/repodata/repomd.xml [Could not resolve host: foo.redhat.com]