On Wed, 30 Sep 2009 07:04:11 -0700 (PDT)
jcbollinger jcbollinger wrote:

> > So, anyone could help me to understand why puppet cannot install
> > both packages?
> 
> There is a mismatch between Puppet's view of package names as a flat
> name space and RPM's view of package identifiers as a 5-dimensional
> space with axes (name, architecture, epoch, version, release).  Puppet
> deals with this in a way that seems reasonable for the majority of
> cases: it attempts to avoid installing multiple packages having the
> same RPM name.  When neither of your packages is installed, however,
> Puppet can't tell that the package "names" you specified are really
> name.arch, so it passes both on to yum/rpm.  Yum and RPM can interpret
> the names, but they don't mind installing the two packages side by
> side.  On the other hand, when one or both of the packages is already
> installed, Puppet can match the package names to installed packages,
> and thereby decide that it doesn't need to install the packages.

Thanks for the explanation. 

doing the query correctly ( :-S ), there's significant differnecse
between SL5 (RH5) and SL4 (RH4, where specifying arch worked):

# cat /etc/redhat-release 
Scientific Linux SL release 5.2 (Boron)
#  /bin/rpm -q perl-DBI.i386 --nosignature --nodigest --qf '%{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'
package perl-DBI.i386 is not installed
#  /bin/rpm -q perl-DBI.x86_64 --nosignature --nodigest --qf '%{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'
package perl-DBI.x86_64 is not installed



# cat /etc/redhat-release 
Scientific Linux SL release 4.8 (Beryllium)
#  /bin/rpm -q perl-DBI.i386 --nosignature --nodigest --qf '%{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'
perl-DBI 0 1.607 1.el4.rf i386

# /bin/rpm -q perl-DBI.x86_64 --nosignature --nodigest --qf '%{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}'
perl-DBI 0 1.607 1.el4.rf x86_64

So seems that something has changed in rpm.



But if I use yum:

# yum list libXpm.i386
Loaded plugins: kernel-module
Excluding Packages from dag
Finished
Installed Packages
libXpm.i386                                                        3.5.5-3      
                                                  installed

# yum list libXpm.x86_64
Loaded plugins: kernel-module
Excluding Packages from dag
Finished
Installed Packages
libXpm.x86_64                                                       3.5.5-3     
                                                  installed


Yum knows about them. So, if we use yum package provider, isn't more
correct to use yum for querying rpm packages status? 
I mean, if I use rpm provider, am I going to query with yum?

Why mix yum/rpm (ok, yum uses rpm, but they're diff programs)?

> To achieve what you want, you need a custom Package provider that
> understands architecture codes in package names and allows side-by-
> side installs.  Then you would declare your packages something like
> 
> package {"libX11-devel.i386": provider => "archyum"}
> 
> You would provide the "archyum" provider as a plug-in, automatically
> downloadable from the puppetmaster.  I suspect that that provider
> could be a relatively simple subclass or a slight variant of the
> standard "yum" provider.

It's a couple of packages, so I'd prefer doing it with an exec.

Many thanks for your time, 
> 
> John
Cheers,
Arnau

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to