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 1753343 - Incorrect parsing of "--setopt" with repositories with dots
Summary: Incorrect parsing of "--setopt" with repositories with dots
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils
Version: 7.6
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-18 16:10 UTC by Brian J. Murrell
Modified: 2019-09-24 11:56 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1746349
Environment:
Last Closed: 2019-09-24 11:51:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Brian J. Murrell 2019-09-18 16:10:14 UTC
I think this needs a backport for EL7 as setting options for repos added with yum-config-manager by url don't work, presumably because they have dots in the fqdn portion of the url they were created from.

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

Description of problem:

The "--setopt" have a problem with repositories with dots in id. The option parser uses first dot as a delimiter.
Repository id may contain dots but option name can't. -> So, the last dot is delimiter and not the first one.
   
Example:
"--setopt=re.po.option=value " is parsed as repo id "re" and option "po.option". Correct result is repo id "re.po" and option "option".

--- Additional comment from Jaroslav Rohel on 2019-08-28 09:09:24 UTC ---

I made fix in upstream PR https://github.com/rpm-software-management/dnf/pull/1466 .

--- Additional comment from Jaroslav Rohel on 2019-08-28 09:11:53 UTC ---

The bug was catch during testing config-repo plugin https://bugzilla.redhat.com/show_bug.cgi?id=1702678 .

Comment 2 Eva Mrakova 2019-09-19 08:51:20 UTC
(In reply to Brian J. Murrell from comment #0)
> I think this needs a backport for EL7 as setting options for repos added
> with yum-config-manager by url don't work, presumably because they have dots
> in the fqdn portion of the url they were created from.

Brian, it's probably a different issue than in the bug 1746349.
yum-config-manager works OK with repos containing dots in their IDs/names
both on rhel7.7 - yum-utils-1.1.31-52.el7 and 7.6 - yum-utils-1.1.31-50.el7

# yum-config-manager --setopt='repo.with.dots.retries=5' --save
# cat /etc/yum.repos.d/repo.with.dots.repo 
[repo.with.dots]
name=repo.with.dots
baseurl=file:///tmp/testpath/repo.with.dots
enabled=0
gpgcheck=0
retries = 5
keepcache = 0

Could you please provide a reproducer for your issue?

Comment 3 Michal Domonkos 2019-09-24 11:51:44 UTC
Indeed, as Eva confirmed, yum *does* already parse such repoids correctly, see:
https://github.com/rpm-software-management/yum/blob/098cf29f8d0329ebbf6f215426d41808c5881960/cli.py#L214

That being said, I'm closing this one as NOTABUG.

Comment 4 Michal Domonkos 2019-09-24 11:56:30 UTC
Original Fedora bug, for reference:
https://bugzilla.redhat.com/show_bug.cgi?id=1023595


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