Issue #2662 has been updated by Charlie Sharpsteen.

Keywords changed from yum provider version arch ensure to yum provider version 
arch ensure customer

----------------------------------------
Bug #2662: Yum package arch and version ensuring failing
https://projects.puppetlabs.com/issues/2662#change-88828

* Author: David Ward
* Status: Accepted
* Priority: High
* Assignee: Charlie Sharpsteen
* Category: package
* Target version: 
* Affected Puppet version: 0.24.7
* Keywords: yum provider version arch ensure customer
* Branch: 
----------------------------------------
After lots of trial and error I found a bug in our current Puppet version

Having a package line like so:

<pre>
 package { "firefox.x86_64": ensure => "3.0.12-1.el5.centos", require => 
Package["xulrunner.x86_64"] }
</pre>

Would fail with debug output:
<pre>
*_
debug: 
//Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox.x86_64]:
 Changing ensure
debug: 
//Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox.x86_64]:
 1 change(s)
debug: Package[firefox.x86_64](provider=yum): Ensuring => 3.0.12-1.el5.centos
debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -d 0 -e 0 -y 
install firefox.x86_64-3.0.12-1.el5.centos'
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q 
firefox.x86_64 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| 
%{VERSION} %{RELEASE}
%{ARCH}
'
err: 
//Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox.x86_64]/ensure:
 change from absent to 3.0.12-1.el5.centos failed: Could
 not update: Could not find package firefox.x86_64 at 
/etc/puppet/manifests/CentOS.pp:149_*
</pre>


It didn't matter if I listed ver-release or just ver, same sort of error; it 
appends the version-[release] to the package name and arch. Which obviously 
fails as yum packages must be referred to like so:

<pre>
          name
          name.arch
          name-ver
          name-ver-rel
          name-ver-rel.arch
          name-epoch:ver-rel.arch
          epoch:name-ver-rel.arch
</pre>

So if I omitted the arch and changed the line to:
<pre>
 package { "firefox": ensure => "3.0.12-1.el5.centos", require => 
Package["xulrunner.x86_64"] }
</pre>

We would have more success with the 64bit version but it would try and bring 
the 32bit Firefox version too along with its dependencies. Not what I wanted.

<pre>
*_debug: Package[firefox](provider=yum): Ensuring => 3.0.12-1.el5.centos.x86_64
debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -d 0 -e 0 -y 
install firefox-3.0.12-1.el5.centos.x86_64'
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q firefox 
--nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} 
%{RELEASE} %{ARCH}
'
err: 
//Node[om012274.drd.int]/workstation/workstation_centos53/mozillasuite53/Package[firefox]/ensure:
 change from 3.0.12-1.el5.centos to 3.0.12-1.el5.centos.x86_64 failed: Could 
not update: Failed to update to version 3.0.12-1.el5.centos.x86_64, got version 
3.0.12-1.el5.centos instead at /etc/puppet/manifests/CentOS.pp:149_*
</pre>

So chatting on IRC and more trial and error I found this is the only way to get 
it to work:
<pre>
 package { "firefox-3.0.12-1.el5.centos.x86_64": ensure => "present", require 
=> Package["xulrunner.x86_64"] }
</pre>

So this side-steps puppets version management though.

This may be fixed in a newer version. I haven't tried yet.






-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to