Bug 436043 - yum-protectbase can't be used with RHN repos., as you can't set options
Summary: yum-protectbase can't be used with RHN repos., as you can't set options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: John Matthews
QA Contact:
URL:
Whiteboard:
: 235046 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-04 23:12 UTC by Howard Johnson
Modified: 2018-10-20 03:07 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:54:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to yum-protectbase to protect RHN repos (1.27 KB, patch)
2008-03-04 23:12 UTC, Howard Johnson
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0195 0 normal SHIPPED_LIVE yum-rhn-plugin bug fix and enhancement update 2009-01-20 16:06:01 UTC

Description Howard Johnson 2008-03-04 23:12:58 UTC
Description of problem:
yum-protectbase plugin needs "protect=yes" to be set in repo configs to protect
a repo. As RHN repos don't have a repo config file, it can't be set.

Version-Release number of selected component (if applicable):
yum-protectbase-1.0.4-3.el5

How reproducible:
Always

Steps to Reproduce:
1. install yum-protectbase
2. configure a repo that provides packages that replace packages from the base
RHN repos
3. run yum update
  
Actual results:
RHN repos aren't protected

Expected results:
RHN repos protected

Additional info:
Attached is a patch to protect RHN repos. In
/etc/yum/pluginconf.d/protectbase.conf, set the following:

[main]
enabled = 1
protectrhn = 1

This should make the plugin protect _all_ RHN-configured repos.

Comment 1 Howard Johnson 2008-03-04 23:12:58 UTC
Created attachment 296828 [details]
Patch to yum-protectbase to protect RHN repos

Comment 2 Jon Stanley 2008-03-05 03:39:48 UTC
I've done several smoketests of this patch and it seems to work.

First, I've simply replaced protectbase.py with the patched version, and enabled
rpmforge (which is known to have a number of conflicting packages w/RHEL).  No
non-RHN provided packages were offered for upgrade.

I then subscribed the system to the fastrack channel, and verified that fastrack
packages *were* offered for upgrade.

Comment 3 Howard Johnson 2008-03-05 10:24:42 UTC
Jon, the plugin should default to not protecting RHN repos. Can you confirm you
also added "protectrhn = " to protectbase.conf for you tests ?

Just checking my logic is right, old chap ;)

Comment 4 Howard Johnson 2008-03-05 10:30:53 UTC
That should have been "protectrhn = 1" of course.

Comment 5 Jon Stanley 2008-03-05 14:58:10 UTC
yes, of course :)  Sorry bout that.

Comment 6 James Antill 2008-03-05 15:16:51 UTC
 So while this isn't a horrible fix, per. se. ... this is the wrong solution
IMO. yum-protectbase works with yum repos. it only has problems with the virtual
RHN repos. (and it's _far_ from the only thing that does).
 For instance, I've done: 

http://people.redhat.com/jantill/yum/plugins/reset-metadata-expire.py

...to try and work around the same problem in RHN repos., but for caching. I've
had other BZs for "exclude" support, then there is "cost" etc. etc.


Comment 7 Howard Johnson 2008-03-05 15:41:47 UTC
Aye, I see your point, and agree to a large extent. Looking at the issue, the
options as I see it are:

- work around this in each plugin (a la my patch above)
- modify rhn-plugin to have some way of setting repo config options locally
- move repo option setting into RHN itself

As channel subscription is managed at the RHN end, managing repo options there
too strikes me as the most local place for it (eg. user subscribes to fasttrack
channel in RHN, forgets to go and set protect=yes for it in the right config
file on the machine). It's also the most complex way of doing it, requiring
changes to rhn-plugin, RHN's UI, backend db, etc. Not a short-term solution, by
any stretch of the imagination.

If there's interest in the "do it in rhn-plugin" option, I can have a poke at
the 5.1 version and see what sort of mess I can make :)

Comment 8 Howard Johnson 2008-03-05 15:43:50 UTC
s/local/logical/

Bugzilla seems to bring out the worst in my typing.

Comment 9 Martin Poole 2008-05-13 08:24:23 UTC
Setting 5.3 until such time as 5.4 flag is available.

Comment 10 RHEL Program Management 2008-06-04 22:45:57 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 17 errata-xmlrpc 2009-01-20 21:54:57 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0195.html

Comment 21 Pradeep Kilambi 2009-02-24 20:11:13 UTC
*** Bug 235046 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.