Bug 1686779

Summary: yum-config-manager does not accept repo names
Product: Red Hat Enterprise Linux 8 Reporter: Eva Mrakova <emrakova>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: unspecified Docs Contact:
Priority: low    
Version: 8.0CC: dmach, james.antill, jmracek, jzeleny, ksrot, packaging-team-maint, pkratoch, tcallawa, tgummels, woodard
Target Milestone: rcKeywords: Triaged
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-plugins-core-4.0.7-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 971599 Environment:
Last Closed: 2019-11-05 22:21:30 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: 1681084    
Bug Blocks:    

Description Eva Mrakova 2019-03-08 10:02:58 UTC
um-config-manager (dnf config-manager) does not accept repo names as arguments
(it accepts only repo IDs, there's no docs related to that). On the other hand, 'dnf repolist' accepts both repo names and IDs.

dnf-4.0.9.2-5.el8.noarch
dnf-plugins-core-4.0.2.2-3.el8.noarch

simple reproducer:
1. create a repo with different name and ID, enable it
2. # dnf --disable <repo-name>
   <snip>
   Error: No matching repo to modify: <repo-name>.

Also /CoreOS/yum-utils/Sanity/bz971599-Yum-config-manager-confuses-ID-and-name can help to reproduce the bug.

+++ This bug was initially created as a clone of Bug #971599 +++

+++ This bug was initially created as a clone of Bug #971598 +++

Description of problem:
Evidently yum config manager confuses ID and name. 


<james> And can yum see it in "yum repolist" ?
<neb> in the list it appears to be:
<neb> rhel-6-server-optional-rpms
<neb> vs
<neb> rhel-server-optional-6-rpms
<james> Are the id and names different?
<james> yum-config-manager just takes ids
<james> repolist does both, IIRC.
<neb> doh that is subtle
<james> ugh … even worse yum-config-manager seems to take names only … doh!
<james> that can't be right.
<james> oh … the code is using name for id … nice.
<james> yeh, repolist has it's own find routine … I can fix that for RHEL-7, probably.
<neb> great. no wonder it had me so confused.
<james> neb: If you could file a RHEL-7 bug/RFE that'd be great.
<neb> this is still rhel6 though
<james> Yeh, you can file a bug there too … I just wouldn't hold your breath.
<neb> still want one for rhel7 but not rhel6
<james> Maybe for 6.6 or whatever.
<neb> OK

Version-Release number of selected component (if applicable):
yum-utils-1.1.30-14.el6.noarch

Comment 1 Jaroslav Mracek 2019-03-28 17:58:39 UTC
I create a patch that improves the documentation. It says that it accept a repoid. https://github.com/rpm-software-management/dnf-plugins-core/pull/330

I also believe that usage of repoid is a proper approach because repoid is a unique identificator. If multiple repos have the same name there is no warning or an error for any operation.
Additionally options like --disablerepo and so on also accept only the repoid.

Comment 7 errata-xmlrpc 2019-11-05 22:21:30 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/RHSA-2019:3583