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 845349 - [RFE] As a Red Hat user, I would like to use the exclude line in the yum.repos.d files and not have them blown away.
Summary: [RFE] As a Red Hat user, I would like to use the exclude line in the yum.rep...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Bryan Kearney
QA Contact: Entitlement Bugs
URL:
Whiteboard:
: 1097651 (view as bug list)
Depends On:
Blocks: 771481
TreeView+ depends on / blocked
 
Reported: 2012-08-02 18:58 UTC by Bryan Kearney
Modified: 2014-05-22 11:22 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:55:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0350 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-02-20 20:53:35 UTC

Description Bryan Kearney 2012-08-02 18:58:08 UTC
Users woudl like to add exclude lines, but these are getting blown away by subscription manager when the repo file is recreated.

Comment 1 xingge 2012-09-05 08:43:27 UTC
I would like to develop test case for the issue, but I can not get more detailed information over the issue, could you help provide the design details of it or detailed test steps on how to verify it?

Comment 2 Laszlo Ersek 2012-09-05 08:58:49 UTC
One live reproducer is flash-plugin. On my x86_64 RHEL-6 system it is available from two repositories:

  $ cat /etc/yum.repos.d/adobe-linux-x86_64.repo 
  [adobe-linux-x86_64]
  name=Adobe Systems Incorporated
  baseurl=http://linuxdownload.adobe.com/linux/x86_64/
  enabled=1
  gpgcheck=1
  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

  # yum info flash-plugin
  Installed Packages
  Name        : flash-plugin
  Arch        : x86_64
  Version     : 11.2.202.238
  Release     : release
  Size        : 19 M
  Repo        : installed
  From repo   : adobe-linux-x86_64
  Summary     : Adobe Flash Player 11.2
  URL         : http://www.adobe.com/downloads/
  License     : Commercial
  Description : Adobe Flash Plugin 11.2.202.238
              : Fully Supported: Mozilla SeaMonkey 1.0+, Firefox 1.5+,
              : Mozilla 1.7.13+

  Available Packages
  Name        : flash-plugin
  Arch        : i686
  Version     : 11.2.202.238
  Release     : 1.el6
  Size        : 5.3 M
  Repo        : rhel-6-workstation-supplementary-rpms
  Summary     : Adobe Flash Player 11.2 i386
  URL         : http://www.adobe.com/downloads/
  License     : Commercial
  Description : Adobe Flash Plugin 11.2.202.238
              : Fully Supported: Mozilla SeaMonkey 1.0+, Firefox 1.5+,
              : Mozilla 1.7.13+

The x86_64 flash plugin is only available from the "adobe-linux-x86_64" repo, and the i686 flash plugin is only available from the "rhel-6-workstation-supplementary-rpms" repo. I have the x86_64 version installed and would like to keep it that way.

Whenever I run "yum update", yum wants to "update" the x86_64 version to the i686 version (the Version numbers are identical between the two bitnesses). Therefore I must invoke "yum update --exclude=flash-plugin": this way it doesn't touch the flash-plugin package. Unfortunately that's not a good way to run "yum update" blindly, because that command line won't update flash-plugin even if Adobe releases a genuinely new version!

Therefore I'd like to exclude "flash-plugin" from "rhel-6-workstation-supplementary-rpms" *only*.

Thanks!

Comment 3 Bryan Kearney 2012-09-05 12:11:45 UTC
the yum.repos.d file allows you to define an excludes line. Your test should be to set a package name, run subscription-manager-refresh and then yum list all and still see the value in the excludes line. Before the fix, the value will be reset.

Comment 4 James Bowes 2012-09-06 10:38:35 UTC
Fixed in master, e25e2b93
should be in subscription-manager 1.0.18

Comment 7 John Sefler 2012-11-26 16:37:54 UTC
Demonstrating the problem on version...
[root@rhsm-compat-rhel63 ~]# rpm -q subscription-manager
subscription-manager-0.99.19.4-1.el6_3.x86_64

After registering and subscribing my rhel63 server system, I now have the following repo managed at the tail end of my redhat.repo file:

[root@rhsm-compat-rhel63 ~]# cat /etc/yum.repos.d/redhat.repo | tail -12

[rhel-6-server-rhev-agent-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/rhev-agent/3/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/1400535588112356773-key.pem
sslclientcert = /etc/pki/entitlement/1400535588112356773.pem
metadata_expire = 86400
[root@rhsm-compat-rhel63 ~]# 

Now let's manually add some valid repository options...

[root@rhsm-compat-rhel63 ~]# echo "priority=10" >>  /etc/yum.repos.d/redhat.repo
[root@rhsm-compat-rhel63 ~]# echo "exclude=rhev-agent *-plugin-*" >>  /etc/yum.repos.d/redhat.repo
[root@rhsm-compat-rhel63 ~]# cat /etc/yum.repos.d/redhat.repo | tail -14

[rhel-6-server-rhev-agent-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/rhev-agent/3/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/1400535588112356773-key.pem
sslclientcert = /etc/pki/entitlement/1400535588112356773.pem
metadata_expire = 86400
priority=10
exclude=rhev-agent *-plugin-*

^^ See, the extra repository options that I manually added are there.  However, after we run a yum transaction, the subscription-manager plugin will clobber them...

[root@rhsm-compat-rhel63 ~]# yum -q repolist
[root@rhsm-compat-rhel63 ~]# cat /etc/yum.repos.d/redhat.repo | tail -12

[rhel-6-server-rhev-agent-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/rhev-agent/3/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/1400535588112356773-key.pem
sslclientcert = /etc/pki/entitlement/1400535588112356773.pem
metadata_expire = 86400
[root@rhsm-compat-rhel63 ~]#

^^ BANG! the manually added "priorty" and "exclude" repository options have been clobbered.

Comment 8 John Sefler 2012-11-26 19:59:48 UTC
Verifying fix on version...
[root@jsefler-6 ~]# rpm -q subscription-manager python-rhsm
subscription-manager-1.1.10-1.el6.x86_64
python-rhsm-1.1.6-1.el6.x86_64


[root@jsefler-6 ~]# subscription-manager register --serverurl=subscription.rhn.stage.redhat.com:443/subscription --username stage_test_12 --autosubscribe
Password: 
The system has been registered with id: d670d92b-cb53-4fc5-9e44-6db319ec794e 
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed

[root@jsefler-6 ~]# yum -q repolist
[root@jsefler-6 ~]# cat /etc/yum.repos.d/redhat.repo | tail -12

[rhel-6-server-rhev-agent-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/rhev-agent/3/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/7600924276684976894-key.pem
sslclientcert = /etc/pki/entitlement/7600924276684976894.pem
metadata_expire = 86400
[root@jsefler-6 ~]# echo "priority=10" >>  /etc/yum.repos.d/redhat.repo
[root@jsefler-6 ~]# echo "exclude=rhev-agent *-plugin-*" >> /etc/yum.repos.d/redhat.repo
[root@jsefler-6 ~]# cat /etc/yum.repos.d/redhat.repo | tail -14

[rhel-6-server-rhev-agent-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/rhev-agent/3/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/7600924276684976894-key.pem
sslclientcert = /etc/pki/entitlement/7600924276684976894.pem
metadata_expire = 86400
priority=10
exclude=rhev-agent *-plugin-*
[root@jsefler-6 ~]# yum -q repolist
[root@jsefler-6 ~]# cat /etc/yum.repos.d/redhat.repo | tail -14

[rhel-6-server-rhev-agent-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/rhev-agent/3/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/7600924276684976894-key.pem
sslclientcert = /etc/pki/entitlement/7600924276684976894.pem
metadata_expire = 86400
priority = 10
exclude = rhev-agent *-plugin-*
[root@jsefler-6 ~]# subscription-manager refresh
All local data refreshed
You have new mail in /var/spool/mail/root
[root@jsefler-6 ~]# cat /etc/yum.repos.d/redhat.repo | tail -14

[rhel-6-server-rhev-agent-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/rhev-agent/3/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/7600924276684976894-key.pem
sslclientcert = /etc/pki/entitlement/7600924276684976894.pem
metadata_expire = 86400
priority = 10
exclude = rhev-agent *-plugin-*
[root@jsefler-6 ~]#


Moving to VERIFIED: manually added redhat.repo repository options are no longer clobbered by yum transactions.

Comment 11 Bryan Kearney 2012-11-27 12:53:40 UTC
Per the current rules, this would not qualify for a z stream.

Comment 12 Laszlo Ersek 2012-11-27 13:39:45 UTC
(In reply to comment #2)

> Therefore I'd like to exclude "flash-plugin" from
> "rhel-6-workstation-supplementary-rpms" *only*.

Works perfectly.

subscription-manager-1.1.10-1.el6.x86_64
python-rhsm-1.1.6-1.el6.x86_64

Thank you again.

Comment 15 errata-xmlrpc 2013-02-21 08:55:29 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.

http://rhn.redhat.com/errata/RHBA-2013-0350.html

Comment 16 Amit Upadhye 2014-05-22 11:22:49 UTC
*** Bug 1097651 has been marked as a duplicate of this bug. ***


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