I recently looked at the gentoo package provider and I think it has a
few problems and I'm interested in how gentoo people tackle these

1) The package provider puts a dependency on eix. While chances are good
that eix is installed it is not part of the base system (AFAIK).
Puppet will not immediatly fail though. If you have e.g. ruby
installed you might ask yourself why puppet tries to install
app-editors/vim with the gem provider.
2) The package provider makes a few assumption where the eix cache is
stored and about PORTDIR beeing /usr/portage. A while ago I saw a
discussion on gentoo-users were multiple people said they place
there portagetree in /var/portage
3) Packagenames are not unique in gentoo. While you can e.g. specify

package { 'rubygems':
ensure => latest,
category => 'dev-ruby',

this still seems to confuse puppet (in my case puppet wants to update
the package saying the installed version is 1.8.24 [which is true] and
the latest version beeing 4 (which is the latest version of
virtual/rubygems, not dev-ruby/rubygems).
To be on the safe side you really have to specify

package { 'dev-ruby/rubygems':
ensure => latest,

and ignore the category parameter.
4) running "puppet resource package" does create resources with only
the packagename, without the category. So you don't see the true result
if you have two packages installed that come from different

# portageq match / '*/rubygems'

# puppet resource package |grep -A 2 rubygems
package { 'rubygems':
ensure => '1.8.24',

5) The provider sometimes lies which seems to be caused by the --stable
flag which is passed to eix. In my case puppet thinks that tar is not

# portageq match / tar

# puppet resource package tar
package { 'tar':
ensure => 'absent',

So I'd like to change the following:
- query with portageq not with eix, e.g.:
# portageq match / ''
version of a specific package
# portageq match / dev-ruby/rubygems
latest version of a specific package
# portageq best_visible / dev-ruby/rubygems
- drop/deprecate the category parameter
- encourage people to include the category in the resource title
- when using puppet resource package also include the category in the

In my opinion these changes should fix all the issues above. One issue will
still exists though: You can install multiple versions of the same package

# portageq match / autoconf

I don't really now what puppet should return as the current version

I'd love to know what you think about the current portage provider and the
proposed changes.


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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouppuppet-users @
postedJun 21, '12 at 6:00p
activeJun 26, '12 at 9:06p

2 users in discussion

Calvin Walton: 1 post Stefan Schulte: 1 post



site design / logo © 2022 Grokbase