It seem to be a known problem. See :
https://projects.puppetlabs.com/issues/2406
May be you should propose your solution : your approach didn't seem to have
been examined.
Personally I like it.
Regards,
Fred
Le mercredi 5 décembre 2012 17:31:27 UTC+1, Danny van der Meulen a écrit :
>
> 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/-/1Woxt4je8wMJ.
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.