- From: "Scott M. Likens" <
>
- To:
- Subject: [chef] Re: Re: [RFC] CHEF-50 - Portage use flags & keywords
- Date: Thu, 11 Feb 2010 13:24:29 -0800
+1 on using /etc/portage/package.(use|keywords)
I find the thought of using env variables to determine which 'USE' is
turned on... to be distasteful because then if you use portage outside
of chef to upgrade the package; you suddenly lost all your USE flags and
you just upgraded the package to fail possibly.
The quandry then becomes how do you have chef manage your
/etc/portage/package. files? Do you want it to be a remote_file?
template? or augeas(*whatever alternatives are go here*)?
Yes it's elegant to mention the use flags in your package block, it's
more elegant if that gets stored properly in /etc/portage/package.use also.
If you can hit both notes, a pint is required.
Scott
On 2/8/10 8:11 AM, Edward Muller wrote:
>
+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
>
>
>
>
>
>
>
Archive powered by MHonArc 2.6.16.