Bug 1748841

Summary: dnf: Bad id for repo when dnf variables are used inside repoid field of repo file
Product: Red Hat Enterprise Linux 8 Reporter: Manu Sunil <msunil>
Component: dnfAssignee: Jaroslav Rohel <jrohel>
Status: CLOSED ERRATA QA Contact: Jan Blazek <jblazek>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 8.0CC: james.antill, pgregorycullen
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.2.17-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:48:13 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 Manu Sunil 2019-09-04 09:30:46 UTC
Description of problem:

When dnf variables are used inside the repoid field of repo file, the following error is thrown. 

	Bad id for repo: testa-$basearch-$releasever, byte = $ 5

The dnf variables are working fine on other fields of the repo file.

This has been reproduced on both RHEL 8 and Fedora 30

Version-Release number of selected component (if applicable):

dnf-0:4.0.9.2-5

Steps to Reproduce:

1.Create a repo file with dnf variables in the repoid field
	[test-$basearch-$releasever]
	Name=Test-$basearch-$releasever
	baseurl=file:///mnt/
	gpgcheck=0
	enabled=1
2.Run # dnf repolist

Actual results:

Bad id for repo: testa-$basearch-$releasever, byte = $ 5

Expected results:

The variables should be resolved to their values.

Additional info:

Repo files on RHEL 7 and RHEL 8 has no issue with usage of yum variables inside the repoid field

Comment 2 Jaroslav Rohel 2019-11-21 11:20:31 UTC
PR: https://github.com/rpm-software-management/dnf/pull/1537

Comment 7 errata-xmlrpc 2020-04-28 16:48:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1823