Bug 1584442

Summary: DNF cannot use a repo file created from Repo.dump()
Product: [Fedora] Fedora Reporter: Brian Lane <bcl>
Component: dnfAssignee: Jaroslav Rohel <jrohel>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 29CC: dmach, jrohel, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.2.5-4.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-31 01:38:39 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 Brian Lane 2018-05-30 23:17:45 UTC
If you create a Repo object and write it to a file using the .dump() function DNF cannot use the file as written because it writes baseurl = [REPO-URL] instead of baseurl = REPO-URL, and gpgkeys = [GPGKEYS] instead of gpgkeys = GPGKEYS

eg.

import dnf
dbo = dnf.Base()
r = dnf.repo.Repo("testing", dbo.conf)
r.baseurl="https://some-repo-url/"
r.dump()

[testing]
bandwidth = 0
basecachedir = /var/tmp/dnf-bcl-sy8x8i
baseurl = ['https://some-repo-url']
cost = 1000
...

Comment 1 Jan Kurik 2018-08-14 10:29:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 2 Jaroslav Rohel 2019-06-18 13:27:30 UTC
PR https://github.com/rpm-software-management/libdnf/pull/752

Comment 3 Fedora Update System 2019-08-14 07:23:49 UTC
FEDORA-2019-d4b6ede072 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d4b6ede072

Comment 4 Fedora Update System 2019-08-16 20:12:13 UTC
dnf-4.2.5-4.fc29, dnf-plugins-extras-4.0.4-2.fc29, libdnf-0.31.0-6.fc29 has been pushed to the Fedora 29 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-2019-d4b6ede072

Comment 5 Fedora Update System 2019-08-31 01:38:39 UTC
dnf-4.2.5-4.fc29, dnf-plugins-extras-4.0.4-2.fc29, libdnf-0.31.0-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.