On Jan 28, 2010, at 10:08 AM, James Cammarata wrote: > > On Wed, 27 Jan 2010 14:42:12 -0600, Carl Caum <carl.c...@gmail.com> wrote: >> Make extra sure that's true. I found it won't give you an error but the >> package still won't always be installed. >> >> On Jan 27, 2010, at 12:05 PM, James Cammarata wrote: >> >>> >>> On Wed, 27 Jan 2010 11:50:41 -0600, Carl Caum <carl.c...@gmail.com> >>> wrote: >>>> Unfortunately even the yum provider sucks at this too. It may have > been >>>> fixed recently, but I don't think so since the problem exists in how > rpm >>>> reports back queries for available packages. I have to solve this with >>> an >>>> exec. . You could do something similar to: >>>> >>>> exec {"install libacl.i386": >>>> command => "up2date --arch i386 libacl", >>>> onlyif => "rpm -qa libacl.i386 | grep 'libacl' "; >>>> } > > Right, the above onlyif isn't perfect. It needs to be more like this: > > onlyif => "rpm -q --qf='%{NAME}.%{ARCH}\n' libacl | grep -q > 'libacl.x86_64'" > > Otherwise, RPM outputs something like this: > > $ rpm -q libacl > libacl-2.2.23-5.3.el4 > > Which has no arch on it. Note that you don't have to use -qa and then > grep, that's slow. You can just do -q <package name> which is much faster > (especially if you have a lot of RPMs installed). This also works on > packages that have multiple arches: > > $ rpm -q --qf '%{NAME}.%{ARCH}\n' tcp_wrappers > tcp_wrappers.x86_64 > tcp_wrappers.i386 > > So now I just need to set this up so it's transparent between RHEL4-5...
Sweet. Thanks. I've never bothered to become a RPM master since I switched to administering RHEL based systems. At some point I'll break down and do it ;) > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@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. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.