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 1287333 - Not possible to override distroverpkg from /etc/yum.conf with --setopt
Summary: Not possible to override distroverpkg from /etc/yum.conf with --setopt
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-02 00:17 UTC by Ian Wienand
Modified: 2018-09-25 12:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-25 12:00:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ian Wienand 2015-12-02 00:17:19 UTC
centos ships a /etc/yum.conf with "distroverpkg=centos-release"

This causes a problem if you're trying to bootstrap a Fedora environment with something like

 $ rpm --root=$PATH_TO_ROOT --initdb 
 $ rpm --root=$PATH_TO_ROOT -i fedora-release*.rpm
 $ yum --installroot=$PATH_TO_ROOT -y install yum

because yum tries to query for "centos-release" package within "--installroot" (which doesn't exist, only fedora-release was installed).

So once you see this, the seemingly obvious thing to do is to use "--setopt=distroverpkg=fedora-release" to this command to get it working (because it was set in /etc/yum.conf)

In [1] distroverpkg is set after reading the configuration file but before any of the main options are read, so setting via --setopt on the command line doesn't work.

For consistency, it seems like it would be a top-level argument along with "--debug", "--releasever", "--installroot" etc, all of which are setup as the "preconf" variables.

The work-around for this is to use "--releasever", which achieves the same thing.  

[1] http://yum.baseurl.org/gitweb?p=yum.git;a=blob;f=yum/config.py;h=0dcbc6a6f56fb91394045c945739a1a6fbe5584c;hb=HEAD#l1055

Comment 3 Daniel Mach 2018-09-24 12:11:15 UTC
Is the issue somehow blocking you?
Would you mind us closing it?

Comment 4 Ian Wienand 2018-09-24 21:26:27 UTC
Hrm, I can't remember the full details, it was a while ago :)  We have [1] working.

I guess this is pretty niche, and ongoing effort to clean up/reorganise arguments in yum is not going to happen at this point, so close away.

[1] https://git.openstack.org/cgit/openstack/diskimage-builder/tree/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot#n154

Comment 6 Red Hat Bugzilla Rules Engine 2018-09-25 12:00:27 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.


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