After getting all of the spacewalk client tools packages added to the package list for kickstarting CentOS 5.4 clients, I noticed that yum was broken on my kickstarted machines:
[r...@localhost ~]# yum update
Loaded plugins: changelog, fastestmirror, protect-packages, rhnplugin
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 157, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig
self.conf
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 664, in
<lambda>
conf = property(fget=lambda self: self._getConfig(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 253, in
_getConfig
self.plugins.run('init')
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/rhnplugin.py", line 145, in init_hook
repo = RhnRepo(channel)
File "/usr/lib/yum-plugins/rhnplugin.py", line 243, in __init__
self.metadata_cookie = 'cookie'
AttributeError: can't set attribute
So I looked around and found out that if you comment out the lines below (in
/usr/lib/yum-plugins/rhnplugin.py), all is well:
self.metadata_cookie = 'cookie'
self.metadata_expire = 0
So I went ahead and added the following sed script to my kickstart file in
order to take care of this during provisioning:
sed -i -e 's/.*self\.metadata_cookie.*/#&/;s/.*self\.metadata_expire.*/#&/;'
/usr/lib/yum-plugins/rhnplugin.py
Anybody else out there that has run across this? Is this a viable solution
to the problem? if so I hope this helps someone else.
-PC
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
