Issue #11380 has been updated by Jo Rhett.

<pre>
[23:07 root@ats003 ~]$ /usr/bin/python 
/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py
_pkg autofs.x86_64 0 CentOS Updates 1:5.0.1-0.rc2.156.el5_7.4
_pkg bind.x86_64 0 CentOS Updates 30:9.3.6-16.P1.el5_7.1
_pkg bind-chroot.x86_64 0 CentOS Updates 30:9.3.6-16.P1.el5_7.1
_pkg bind-libs.x86_64 0 CentOS Updates 30:9.3.6-16.P1.el5_7.1
_pkg bind-utils.x86_64 0 CentOS Updates 30:9.3.6-16.P1.el5_7.1
_pkg device-mapper-multipath.x86_64 0 CentOS Updates 0.4.7-46.el5_7.2
<type 'exceptions.AttributeError'>

[23:07 root@ats003 ~]$ echo $?
1

[23:08 root@ats003 ~]$ /usr/bin/python2.4 
/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py
Puppet::Type.type(:package).provide :yum, :parent => :rpm, :source => :rpm do
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
_pkg libxml2-python 0 2.6.26 2.1.12.el5_7.1 x86_64
_pkg bind-libs 30 9.3.6 16.P1.el5_7.1 x86_64
_pkg libvolume_id 0 095 14.27.el5_7.1 x86_64
_pkg gtk2 0 2.10.4 21.el5_7.7 i386
_pkg nss-tools 0 3.12.10 7.el5_7 x86_64
_pkg kernel-headers 0 2.6.18 274.12.1.el5 x86_64
_pkg nash 0 5.1.19.6 71.el5_7.1 x86_64
_pkg device-mapper-multipath 0 0.4.7 46.el5_7.2 x86_64
_pkg freetype 0 2.2.1 28.el5_7.2 i386
_pkg ntp 0 4.2.2p1 15.el5.centos.1 x86_64
_pkg mkinitrd 0 5.1.19.6 71.el5_7.1 x86_64
_pkg httpd-manual 0 2.2.3 53.el5.centos.3 x86_64
_pkg puppet 0 2.7.9 1.el5 noarch
_pkg mod_ssl 1 2.2.3 53.el5.centos.3 x86_64
_pkg nss_ldap 0 253 42.el5_7.4 i386
_pkg nss 0 3.12.10 7.el5_7 i386
_pkg libxml2 0 2.6.26 2.1.12.el5_7.1 x86_64
_pkg mkinitrd 0 5.1.19.6 71.el5_7.1 i386
_pkg libvolume_id 0 095 14.27.el5_7.1 i386
_pkg udev 0 095 14.27.el5_7.1 x86_64
_pkg kernel 0 2.6.18 274.12.1.el5 x86_64
_pkg postgresql-libs 0 8.1.23 1.el5_7.3 x86_64
_pkg tzdata 0 2011l 4.el5 x86_64
_pkg nss 0 3.12.10 7.el5_7 x86_64
_pkg perl 4 5.8.8 32.el5_7.6 x86_64
_pkg facter 0 1.6.4 1.el5 noarch
_pkg bind-utils 30 9.3.6 16.P1.el5_7.1 x86_64
_pkg bind 30 9.3.6 16.P1.el5_7.1 x86_64
_pkg freetype 0 2.2.1 28.el5_7.2 x86_64
_pkg rsh 0 0.17 40.el5_7.1 x86_64
_pkg autofs 1 5.0.1 0.rc2.156.el5_7.4 x86_64
_pkg gtk2 0 2.10.4 21.el5_7.7 x86_64
_pkg bind-chroot 30 9.3.6 16.P1.el5_7.1 x86_64
_pkg kpartx 0 0.4.7 46.el5_7.2 x86_64
_pkg httpd 0 2.2.3 53.el5.centos.3 x86_64
_pkg nss_ldap 0 253 42.el5_7.4 x86_64

[23:08 root@ats003 ~]$ echo $?
0
</pre>

For reference sake, you can create this problem on a stock rhel system with

<pre>
yum install python26
alternates --set python /usr/bin/python2.6
</pre>

Voila, puppet yum packages are broken.
----------------------------------------
Bug #11380: yum.rb should hardcode python2.4 on rhel5 systems, or allow 
configuration option to override
https://projects.puppetlabs.com/issues/11380

Author: Jo Rhett
Status: Needs More Information
Priority: Normal
Assignee: Jo Rhett
Category: package
Target version: 
Affected Puppet version: 2.6.12
Keywords: 
Branch: 


On rhel5 systems yum only works with the system-installed python2.4 binary.  If 
any other python version is in the path, you get the following error:

<pre>
Wed Dec 14 00:52:13 +0000 2011 Puppet (err): Could not prefetch package 
provider 'yum': Execution of '/usr/local/bin/python 
/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py' returned 1: 
_pkg NetworkManager.i386 0 CentOS Base 1:0.7.0-13.el5
(snip)
_pkg NetworkManager.x86_64 0 CentOS Base 1:0.7.0-13.el5
<type 'exceptions.AttributeError'>
</pre>

On redhat systems it makes no sense to call python unqualified praying that any 
given python in the path will work. "/usr/bin/python2.4" will always work.

A much better option would be to allow the python to be called as a 
configuration option.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to