Bug 1476215 - repoquery --location sometimes prints invalid URL
Summary: repoquery --location sometimes prints invalid URL
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-28 10:16 UTC by Ian Collier
Modified: 2017-08-09 15:59 UTC (History)
6 users (show)

Fixed In Version: dnf-2.6.3-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-09 15:59:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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