puppet-portage
puppet-portage copied to clipboard
add SLOT support in portage::package
No design details yet
This one needs an extra attribute $slot in package_* providers, and then a attributes $slot, $slot_{keywords,use,mask,unmask} in portage::package as well (just like $version and $target)
Installing in two or more different slots using portage::package
is not possible yet. We need to patch the upstream package provider to query slots through eix
.
It's not even possible to add to add the same package with different slots in any of the package_* providers yet either. We will need to come up with another solution for that, since puppet will scream for duplicate resource if we do the following:
package_keywords { 'sys-devel/gcc':
slot => '4.4'
}
package_keywords { 'sys-devel/gcc':
slot => '4.5'
}
A solution might be to force the user to add the slot in the resource name, and then make puppet-portage to construct the package name and slot based on that, for example:
package_keywords { 'sys-devel/gcc:4.8'}
# Internally set $name=sys-devel/gcc $slot=4.8
another solution I just though of is to provide values to the slot
argument as a list:
package_keywords { 'sys-devel/gcc':
slot => ['4.4', '4.5']
}
portage::package { 'sys-devel/gcc':
slot => ['4.4', '4.5']
}
In this case, package_keywords
will add two entries in package.keywords
, and portage::package
will install both gcc:4.4
and gcc:4.5
. How about this?
SGTM.
is something like this implemented yet?
This will be a lot easier if the upstream provider supports slots: https://github.com/puppetlabs/puppet/pull/2649
Slots are available since puppet 4.6.0 (puppet-agent 1.6.0), according to https://tickets.puppetlabs.com/browse/PUP-2802 (related to https://github.com/puppetlabs/puppet/pull/2649). I would be also interested in this feature (there seems to be no way to set USE per slot right now...).