Hi,
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
problems:
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
categories.
# portageq match / ''*/rubygems''
dev-ruby/rubygems-1.8.24
virtual/rubygems-4
# 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
installed.
# portageq match / tar
app-arch/tar-1.26
# puppet resource package tar
package { ''tar'':
ensure => ''absent'',
}
So I''d like to change the following:
- query with portageq not with eix, e.g.:
packagelist:
# 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
packagename
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
(slots):
# portageq match / autoconf
sys-devel/autoconf-2.13
sys-devel/autoconf-2.69
I don''t really now what puppet should return as the current version
here.
I''d love to know what you think about the current portage provider and
the
proposed changes.
-Stefan
--
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.