- From: Edward Muller <
>
- To:
- Subject: [chef] Re: [RFC] CHEF-50 - Portage use flags & keywords
- Date: Mon, 8 Feb 2010 08:11:11 -0800
+1 on #2 (managing /etc/portage/package.(use|keywords)
setting the USE variables when emerging a package is considered "temporary".
If for any reason the package(s) installed via this method get
re-emerged outside of chef (like by a sysadmin troubleshooting a
problem) the use flags will be lost (unless the sysadmin knows the
flags to tell emerge, which is doubtful).
On Mon, Feb 8, 2010 at 4:24 AM, Kenneth Kalmer
<
>
wrote:
>
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
>
--
Edward Muller
Sr. Systems Engineer
Engine Yard Inc. : Support, Scalability, Reliability
+1.866.518.9273 x209 - Mobile: +1.417.844.2435
IRC: edwardam - XMPP/GTalk:
Pacific/US
Archive powered by MHonArc 2.6.16.