Comments (6)
http://wiki.gentoo.org/wiki//etc/portage/env indicates that file format would be bash environment variables, correct? Could you provide an example of how you would expect to use a package_env
resource?
from puppet-portage.
Yes, files in /etc/portage/env are just bash environment variables. I typically only put one variable per file, but by no means is that a requirement, as the wiki shows in the first example. Files in /etc/portage/package.env/ then look exactly like those in /etc/portage/package.use, except instead of USE flags, they contain references to the files in /etc/portage/env.
I would thus expect there to be two definitions in Puppet manifests, one to define the file in /etc/portage/env and one to define the file in /etc/portage/package.env.
Here's an example of how I would envision it (given my current limited knowledge of the Puppet language and Ruby in general):
portage::env { 'makeopts-j1':
ensure => present,
target => 'single-build-thread',
var => 'MAKEOPTS',
content => '-j1',
}
portage::env { 'no-distcc':
ensure => present,
target => 'no-distcc',
var => 'FEATURES',
content => '-distcc',
}
package_env { 'dev-libs/boost':
ensure => present
target => 'boost',
env => ['no-distcc', 'single-build-thread'],
}
This would create the following files:
/etc/portage/env/single-build-thread
:
# HEADER: This file was autogenerated at Tue Apr 15 15:44:25 -0500 2013
# HEADER: by puppet. While it can still be managed manually, it
# HEADER: is definitely not recommended.
MAKEOPTS="-j1"
/etc/portage/env/no-distcc
:
# HEADER: This file was autogenerated at Tue Apr 15 15:44:25 -0500 2013
# HEADER: by puppet. While it can still be managed manually, it
# HEADER: is definitely not recommended.
FEATURES="-distcc"
/etc/portage/package.env/boost
:
# HEADER: This file was autogenerated at Tue Apr 15 15:44:25 -0500 2013
# HEADER: by puppet. While it can still be managed manually, it
# HEADER: is definitely not recommended.
dev-libs/boost no-distcc single-build-thread
I could probably implement this using the concat
method like the current portage::makeconf
implementation, but I got the feeling from issue #56 that that implementation would be going away.
from puppet-portage.
package_env
is already implemented. For portage::env
, just use a file
resource?
from puppet-portage.
what is the difference between putting FEATURES="distcc"
in /etc/portage/env/no-distcc
and /etc/portage/make.conf
?
from puppet-portage.
I tried implementing what op suggested with concat
but it doesn't work if we set multiple portage::env
resources to have the same target
. We could instead have a list of variables set in a single portage::env
resource.
from puppet-portage.
not another define please, native types and providers only. If you want to implement that, name it portage_env
from puppet-portage.
Related Issues (20)
- Implement type/provider for mirrorselect
- Each time I run puppet agent it re-emerges php HOT 4
- eselect no longer support --no-color (it should be --colour=no) HOT 3
- package_keywords and portage::package conflict on declaration
- Ability to install multiple versions of the same package
- Missing support for package.license
- package_env improvements
- Support for repos.conf
- permit multiple package_* definitions for same package
- Facter 3.0.1 Compatability? HOT 1
- package_keywords fails to parse package.keywords comment lines HOT 4
- Layman >=2.3.0
- Package is always rebuilt when flags change
- comment matching pattern HOT 1
- Anyone maintainig this? HOT 1
- Add possibilty to set keyword versions for module maintained packages HOT 2
- Package not rebuild after new flag addition HOT 3
- portage::package doesnt ensure @world presence
- Layman support breaks make.conf HOT 1
- Providers are overly restrictive and confine to operatingsystem rather than osfamily
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-portage.