client/rhel/yum-rhn-plugin/rhnplugin.py | 11 ++++++-----
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 6 +++++-
rel-eng/packages/yum-rhn-plugin | 2 +-
3 files changed, 12 insertions(+), 7 deletions(-)
New commits:
commit 833dce50e1aa0b32adb64ae2557a756050186b2a
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon May 2 14:31:46 2011 +0200
Automatic commit of package [yum-rhn-plugin] release [1.5.6-1].
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index 9b7471c..a799606 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -1,6 +1,6 @@
Summary: RHN support for yum
Name: yum-rhn-plugin
-Version: 1.5.5
+Version: 1.5.6
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -72,6 +72,10 @@ fi
%doc LICENSE
%changelog
+* Mon May 02 2011 Miroslav Suchý 1.5.6-1
+- set proxy_dict only if we have some proxy
+- proxy_dict is private attribute
+
* Fri Apr 29 2011 Miroslav Suchý 1.5.5-1
- code cleanup
- 691283 - create persistdir in _repos_persistdir instead of PWD
diff --git a/rel-eng/packages/yum-rhn-plugin b/rel-eng/packages/yum-rhn-plugin
index 4f74e89..5d65323 100644
--- a/rel-eng/packages/yum-rhn-plugin
+++ b/rel-eng/packages/yum-rhn-plugin
@@ -1 +1 @@
-1.5.5-1 client/rhel/yum-rhn-plugin/
+1.5.6-1 client/rhel/yum-rhn-plugin/
commit e63847b2665552a364977f507da6ca62303009c1
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon May 2 14:28:36 2011 +0200
set proxy_dict only if we have some proxy
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 44c7f55..f7c99b6 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -107,10 +107,11 @@ def prereposetup_hook(conduit):
proxy_dict = {}
try:
proxy_url = get_proxy_url(up2date_cfg)
- if up2date_cfg['useNoSSLForPackages']:
- proxy_dict = {'HTTP' : proxy_url}
- else:
- proxy_dict = {'HTTPS' : proxy_url}
+ if proxy_url:
+ if up2date_cfg['useNoSSLForPackages']:
+ proxy_dict = {'HTTP' : proxy_url}
+ else:
+ proxy_dict = {'HTTPS' : proxy_url}
except BadProxyConfig:
rhn_enabled = False
PROXY_ERROR = _("There was an error parsing the RHN proxy settings.")
commit c9b73294699cb2c7caf8db0e11e8d49d36d225e1
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon May 2 14:27:23 2011 +0200
proxy_dict is private attribute
addressing:
Loaded plugins: rhnplugin, security
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 178, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 345, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in
_getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in
_getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 662, in
<lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 502, in
_getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 232, in
populateSack
self.doSetup()
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 64, in doSetup
self.ayum.plugins.run('prereposetup')
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/share/yum-plugins/rhnplugin.py", line 184, in
prereposetup_hook
repo.proxy_dict = proxy_dict
AttributeError: can't set attribute
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py
b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 89df90a..44c7f55 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -181,7 +181,7 @@ def prereposetup_hook(conduit):
repo.sslcacert = sslcacert
repo.enablegroups = enablegroups
repo.metadata_expire = metadata_expire
- repo.proxy_dict = proxy_dict
+ repo._proxy_dict = proxy_dict
if hasattr(conduit.getConf(), '_repos_persistdir'):
repo.base_persistdir = conduit.getConf()._repos_persistdir
repoOptions = getRHNRepoOptions(conduit, repo.id)