Bug 1476215

Summary: repoquery --location sometimes prints invalid URL
Product: [Fedora] Fedora Reporter: Ian Collier <imc>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 26CC: dmach, jmracek, mhatina, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-2.6.3-1.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-09 15:59:32 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 Ian Collier 2017-07-28 10:16:05 UTC
If the baseurl of a repository lacks a trailing slash in the repo file,
"dnf repoquery --location" and "dnf download --url" print a URL that is
missing a slash and therefore doesn't work:

$ cat /etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
$ dnf repoquery --location google-chrome-stable
Last metadata expiration check: 0:31:32 ago on Fri Jul 28 10:20:51 2017.
http://dl.google.com/linux/chrome/rpm/stable/x86_64google-chrome-stable-60.0.3112.78-1.x86_64.rpm

But dnf has no problem in installing from this repo, and "dnf download" has
no problem in downloading the package.  Moreover, "yumdownloader --url" also
prints the correct URL.  So the trailing slash does not seem to be mandatory
(and is not documented as being so).

Comment 1 Jaroslav Mracek 2017-08-01 16:56:26 UTC
I created a patch that should fix the issue (https://github.com/rpm-software-management/dnf/pull/879).

Comment 2 Fedora Update System 2017-08-07 12:50:00 UTC
dnf-2.6.3-1.fc26 dnf-plugins-extras-2.0.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96

Comment 3 Fedora Update System 2017-08-08 01:24:09 UTC
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96

Comment 4 Fedora Update System 2017-08-09 15:59:32 UTC
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.