client/rhel/yum-rhn-plugin/rhnplugin.py | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
New commits:
commit bcbe39f7d2dcabb500d6e4411cbc80b6ca99ee14
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Aug 2 15:41:25 2011 +0200
fixed package exclusion
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 8885c19..1341610 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -169,6 +169,7 @@ def init_hook(conduit):
repo.sslcacert = sslcacert
repo.enablegroups = conduit_conf.enablegroups
repo.metadata_expire = conduit_conf.metadata_expire
+ repo.exclude = conduit_conf.exclude
repo._proxy_dict = proxy_dict
if hasattr(conduit_conf, '_repos_persistdir'):
repo.base_persistdir = conduit_conf._repos_persistdir
@@ -176,7 +177,10 @@ def init_hook(conduit):
for options in [pluginOptions, repoOptions]:
if options:
for o in options:
- setattr(repo, o[0], o[1])
+ if o[0] == 'exclude': # extend current list
+ setattr(repo, o[0], ",".join(repo.exclude) +
',' + o[1])
+ else: # replace option
+ setattr(repo, o[0], o[1])
conduit.info(5, "Repo '%s' setting option
'%s' = '%s'" %
(repo.id, o[0], o[1]))
repos.add(repo)
commit 8d4bd5ab06f2830467683c554b1ef21094225899
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Aug 2 15:36:09 2011 +0200
gpgcheck already is processed by pluginOptions and repoOptions
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 75569fa..8885c19 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -150,7 +150,6 @@ def init_hook(conduit):
repos = conduit.getRepos()
conduit_conf = conduit.getConf()
cachedir = conduit_conf.cachedir
- gpgcheck = conduit.confBool('main', 'gpgcheck',
conduit_conf.gpgcheck)
sslcacert = get_ssl_ca_cert(up2date_cfg)
pluginOptions = getRHNRepoOptions(conduit, 'main')
@@ -165,7 +164,7 @@ def init_hook(conduit):
if channel['version']:
repo = RhnRepo(channel)
repo.basecachedir = cachedir
- repo.gpgcheck = gpgcheck
+ repo.gpgcheck = conduit_conf.gpgcheck
repo.proxy = proxy_url
repo.sslcacert = sslcacert
repo.enablegroups = conduit_conf.enablegroups
commit 0194651deb2c2d96031a346dab7cfacc0abd00dd
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Aug 2 14:55:20 2011 +0200
725496 - respect default plugin settings from [main]
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 7da9a72..75569fa 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -152,6 +152,7 @@ def init_hook(conduit):
cachedir = conduit_conf.cachedir
gpgcheck = conduit.confBool('main', 'gpgcheck',
conduit_conf.gpgcheck)
sslcacert = get_ssl_ca_cert(up2date_cfg)
+ pluginOptions = getRHNRepoOptions(conduit, 'main')
cachefilename = os.path.join(cachedir, cachedRHNReposFile)
try:
@@ -173,10 +174,11 @@ def init_hook(conduit):
if hasattr(conduit_conf, '_repos_persistdir'):
repo.base_persistdir = conduit_conf._repos_persistdir
repoOptions = getRHNRepoOptions(conduit, repo.id)
- if repoOptions:
- for o in repoOptions:
- setattr(repo, o[0], o[1])
- conduit.info(5, "Repo '%s' setting option '%s' =
'%s'" %
+ for options in [pluginOptions, repoOptions]:
+ if options:
+ for o in options:
+ setattr(repo, o[0], o[1])
+ conduit.info(5, "Repo '%s' setting option
'%s' = '%s'" %
(repo.id, o[0], o[1]))
repos.add(repo)
if cachefile:
commit 02145a0239aaad134652fb396c5d771df58a463d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Aug 2 14:52:41 2011 +0200
removed redundant variables
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 9afa8d2..7da9a72 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -150,11 +150,8 @@ def init_hook(conduit):
repos = conduit.getRepos()
conduit_conf = conduit.getConf()
cachedir = conduit_conf.cachedir
- default_gpgcheck = conduit_conf.gpgcheck
- gpgcheck = conduit.confBool('main', 'gpgcheck', default_gpgcheck)
+ gpgcheck = conduit.confBool('main', 'gpgcheck',
conduit_conf.gpgcheck)
sslcacert = get_ssl_ca_cert(up2date_cfg)
- enablegroups = conduit_conf.enablegroups
- metadata_expire = conduit_conf.metadata_expire
cachefilename = os.path.join(cachedir, cachedRHNReposFile)
try:
@@ -170,8 +167,8 @@ def init_hook(conduit):
repo.gpgcheck = gpgcheck
repo.proxy = proxy_url
repo.sslcacert = sslcacert
- repo.enablegroups = enablegroups
- repo.metadata_expire = metadata_expire
+ repo.enablegroups = conduit_conf.enablegroups
+ repo.metadata_expire = conduit_conf.metadata_expire
repo._proxy_dict = proxy_dict
if hasattr(conduit_conf, '_repos_persistdir'):
repo.base_persistdir = conduit_conf._repos_persistdir