Bug 1686779 - yum-config-manager does not accept repo names
Summary: yum-config-manager does not accept repo names
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.1
Assignee: Jaroslav Mracek
QA Contact: Eva Mrakova
Depends On: 1681084
TreeView+ depends on / blocked
Reported: 2019-03-08 10:02 UTC by Eva Mrakova
Modified: 2020-11-14 08:09 UTC (History)
10 users (show)

Fixed In Version: dnf-plugins-core-4.0.7-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 971599
Last Closed: 2019-11-05 22:21:30 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3583 0 None None None 2019-11-05 22:21:41 UTC

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.


simple reproducer:
1. create a repo with different name and ID, enable it
2. # dnf --disable <repo-name>
   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):

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.


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