Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947262 - Add a slot negator
Summary: Add a slot negator
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Package Manager Specification
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2024-12-31 08:51 UTC by konsolebox
Modified: 2024-12-31 10:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description konsolebox 2024-12-31 08:51:44 UTC
To allow a library to support multiple targets across different versions it would have to consistently disallow having multiple installed versions supporting the same target.  I can only think of a slot negator syntax to get this done right.

For example:

```
SLOT="${PV}"

...

for version in $(ruby_get_use_implementations); do
	target=ruby_targets_ruby${version}
	RDEPEND+=" ${target}? ( !${P}:!${SLOT}[${target}] )"
done
```

Something like that.

My current use case is typeprof: https://github.com/ruby/typeprof which only supports 3.3+.  It's directly required by dev-lang/ruby itself.

Reproducible: Always
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-12-31 08:55:04 UTC
You have to actually explain what it will do.
Comment 2 konsolebox 2024-12-31 08:57:56 UTC
(In reply to Michał Górny from comment #1)
> You have to actually explain what it will do.

What else is there to explain?
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-12-31 08:59:05 UTC
Everything.  Your explanation is completely incomprehensible to me.
Comment 5 Fabian Groffen gentoo-dev 2024-12-31 10:11:35 UTC
This sounds similar to the "antislot" feature that was added to portage-utils for Perl ebuilds.

A feature present in portage-utils is the so-called antislot, and is
activated by starting the atom with a carrot (^), in place of the
blocker bang (!).  The antislot is similar to the inversing behaviour of
a blocker, but only operates on SLOT and SUBSLOT, and requires SLOT to
be available, e.g. it won't match unset SLOT (NULL).

https://bugs.gentoo.org/683430