Don't know if this is the right place to post this, forgive me if it is not
:-)
I'm using the squeeze-backports repository on our machines in puppet :
package { 'rsyslog':
ensure => 'present',
name => 'rsyslog/squeeze-backports';
}
IMHO this is the cleanest way to select targets in debian/puppet.
This works okay, but every time when a puppet run runs it want to reinstall
the package.
Quite logical because the dpkg.rb provider uses :
dpkg-query -W --showformat '${Status} ${Package} ${Version}\\n',
@resource[:name]
@resource[:name] evaluates to 'rsyslog/squeeze-backports' and dpkg-query
will return with exit code 1 ( package not found ).
Why not change the query into :
dpkg-query -W --showformat '${Status} ${Package} ${Version}\\n',
@resource[:name].split('/')[0]
Which will select the correct package name and solves my problem.
Greetings,
Danny van der Meulen
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-dev/-/nIhidW6ow5UJ.
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-dev?hl=en.