Issue #499 has been updated by Florian Klink.

is there any progress on this feature?

----------------------------------------
Feature #499: Support for Gentoo use flags
https://projects.puppetlabs.com/issues/499#change-93973

* Author: Greg McIntyre
* Status: Closed
* Priority: Normal
* Assignee: Puppet Community
* Category: Gentoo
* Target version: 
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
Forgive me if there's a way to do this already. I can't seem to find an elegant 
way to do it.

I tried 2 approaches.

1. Setting the USE environment variable.

<pre>
#!ruby
package { ssh:
  name => "net-misc/openssh",
  ensure => latest,
  env => 'USE="ldap"'
}
</pre>

2. Appending entries to /etc/portage/package.use before installing a package.

<pre>
#!ruby

# got this from somewhere on the net, uses exec, the 
# exec unless argument, grep and sed.
define append_if_no_such_line($file, $line) { ... }

append_if_no_such_line { tracportageuseflags:
  file => "/etc/portage/package.use",
  line => "www-apps/trac sqlite fastcgi vhosts"
}
package { trac:
  ensure => latest,
  require => Append_if_no_such_line[tracportageuseflags]
}
</pre>

That works, but it's ugly and it will fail or write useless files when 
$packager != gentoo.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to