[chef] [RFC] CHEF-50 - Portage use flags & keywords


Chronological Thread 
  • From: Kenneth Kalmer < >
  • To: chef < >
  • Subject: [chef] [RFC] CHEF-50 - Portage use flags & keywords
  • Date: Mon, 8 Feb 2010 14:24:47 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=gkm+LOJDCA37DxkTxlPRwP4lliL5Y2UV0Sj77V7FA/nTgFpL6RV/3FnkYVIN+EC1rz pBGr2HYiaFR9Aite9xwMKaznSQOhEuU+skBJbv1afLqGSRwcZUrqvU7+O1Cv13uFOscc RFo+LSMWNNcI3FP1MdyFr5gaCSL9szrIcw6uo=

Dear chefs

I've updated CHEF-50 with some information, pasted in this email as well. I would like to solicit some feedback on how we can get this issue resolved.

Best


Currently Chef::Resource::Package doesn't give us the ability to pass arbitrary attributes that can be used by Chef::Provider::Package::Portage to manipulate the USE & KEYWORDS environment variables.

I can think of three possible routes to follow here, outlined below:

The first is to expand Chef::Resource::Package to accept a hash of environment variables that can be passed to the underlying package providers. This is generic enough, and could be used by other providers as well:

    package "net-dns/pdns" do
      action :install
      environment "USE" => "mysql"
    end

The above can then be interpreted by the Portage provider and executed as "USE=mysql emerge net-dns/pdns"

The second could be to implement two new providers specifically for Gentoo, one for manipulating use flags and the other for manipulating keywords (both through the corresponding /etc/portage/package.{use|keywords} files

    use "net-dns/pdns" do
      flags "mysql"
    end

    keywords "dev-db/couchdb" do
      accept "~x86"
    end

The last, and least desirable option would be to expand Chef::Resource::Package to accept 'use' and 'keywords' as attributes, but that blows it open to expansion from every child provider.

--
Kenneth Kalmer
">
http://opensourcery.co.za
@kennethkalmer



Archive powered by MHonArc 2.6.16.

§