puppet-portage icon indicating copy to clipboard operation
puppet-portage copied to clipboard

add SLOT support in portage::package

Open tampakrap opened this issue 12 years ago • 8 comments

No design details yet

tampakrap avatar Feb 16 '13 23:02 tampakrap

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)

tampakrap avatar Mar 01 '13 14:03 tampakrap

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.

vikraman avatar Jul 02 '13 22:07 vikraman

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

tampakrap avatar Jul 02 '13 22:07 tampakrap

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?

tampakrap avatar Oct 30 '13 14:10 tampakrap

SGTM.

Flameeyes avatar Oct 30 '13 17:10 Flameeyes

is something like this implemented yet?

Titzi90 avatar Aug 15 '14 16:08 Titzi90

This will be a lot easier if the upstream provider supports slots: https://github.com/puppetlabs/puppet/pull/2649

vikraman avatar Aug 15 '14 19:08 vikraman

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...).

samuraiii avatar Jan 04 '17 08:01 samuraiii