RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1095161 - yum-config-manager --setopt doesn't work with wildcards
Summary: yum-config-manager --setopt doesn't work with wildcards
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks: 1129590
TreeView+ depends on / blocked
 
Reported: 2014-05-07 08:37 UTC by Karel Srot
Modified: 2015-03-05 09:03 UTC (History)
2 users (show)

Fixed In Version: yum-3.4.3-119.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1094373
: 1129590 (view as bug list)
Environment:
Last Closed: 2015-03-05 09:03:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0398 0 normal SHIPPED_LIVE yum bug fix update 2015-03-05 14:00:27 UTC

Description Karel Srot 2014-05-07 08:37:41 UTC
Same problems as in RHEL-6 bug 1094373.
yum-3.4.3-117.el7.noarch 

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

Description of problem:

# rpm -q yum
yum-3.2.29-51.el6.noarch

# yum-config-manager --setopt '*.retries=11' repoBlah1 repoBlah2 | egrep '(\[repoBlah|retries)'
[repoBlah1]
retries = 10
[repoBlah2]
retries = 10

# yum-config-manager --setopt 'repoBlah*.retries=11' repoBlah1 repoBlah2 | egrep '(\[repoBlah|retries)'
[repoBlah1]
retries = 10
[repoBlah2]
retries = 10

# yum-config-manager --setopt 'repoBlah1.retries=11' repoBlah1 repoBlah2 | egrep '(\[repoBlah|retries)'
[repoBlah1]
retries = 11
[repoBlah2]
retries = 10

Also, the --setopt parsing could be a bit more tolerant to the provided input.

# yum-config-manager --setopt 'repoBlah1.retries = 11' repoBlah1 repoBlah2 | egrep '(\[repoBlah|retries)'
Repo repoBlah1 did not have a retries  attr. before setopt
[repoBlah1]
retries = 10
retries  =  11
[repoBlah2]
retries = 10

Comment 2 Valentina Mukhamedzhanova 2014-08-13 09:45:06 UTC
Here is the upstream commit for fixing the spaces handling part. Everything else will be fixed as part of bug 1129590 in yum-utils.

commit 0954b42554b7f78809d9050886b419a99e28d289
Author: Valentina Mukhamedzhanova <vmukhame>
Date:   Tue May 13 15:50:52 2014 +0200

    Make --setopt handle spaces properly. BZ 1094373

diff --git a/cli.py b/cli.py
index c1ef023..aa73278 100755
--- a/cli.py
+++ b/cli.py
@@ -193,7 +193,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
             if len(vals) < 2:
                 bad_setopt_ne.append(item)
                 continue
-            k,v = vals
+            k, v = [i.strip() for i in vals]
             period = k.rfind('.')
             if period != -1:
                 repo = k[:period]

Comment 7 errata-xmlrpc 2015-03-05 09:03:58 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://rhn.redhat.com/errata/RHBA-2015-0398.html


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