Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 680496 - [Future EAPI] Add the ability to make the state of a particular USE flag part of the subslot
Summary: [Future EAPI] Add the ability to make the state of a particular USE flag part...
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2019-03-15 18:48 UTC by Patrick McLean
Modified: 2024-10-30 04:14 UTC (History)
14 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 Patrick McLean gentoo-dev 2019-03-15 18:48:20 UTC
There are cases where USE flags change the ABI of a package (at the moment in base-system there is an issue where the "tinfo" USE flag changes the ABI of ncurses). It would be useful to be able to make the state of a particular flag be part of the subslot for a package.

I would suggest a syntax like this:

SLOT="0/6[foo]"

This would make the state of the "foo" USE flag a part of the subslot for that package, so changing the state of the flag would trigger rebuilds for all packages with a subslot dependency on the package defining the subslot.
Comment 1 Ulenrich 2019-03-15 18:57:28 UTC
Do you think of something what happened to wxGTK for example:
---
$ eshowkw  x11-libs/wxGTK
Keywords for x11-libs/wxGTK:
              |                           a     |              |  
              |                           m     |              |  
              |                           d   x |              |  
              |                           6   8 |              |  
              |                           4   6 |   u          |  
              | a a   a     p           s |   | |   n          |  
              | l m   r i   p   h m s   p f m f | e u s        | r
              | p d a m a p c x p 6 3   a b i b | a s l        | e
              | h 6 r 6 6 p 6 8 p 8 9 s r s p s | p e o        | p
              | a 4 m 4 4 c 4 6 a k 0 h c d s d | i d t        | o
--------------+---------------------------------+--------------+-------
   3.0.3      | + + + ~ + + + + + o o ~ + o ~ ~ | 6 # 3.0      | gentoo
--------------+---------------------------------+--------------+-------
   3.0.3-r300 | ~ + ~ o ~ + + + ~ o o ~ + o ~ ~ | 6 o 3.0-gtk3 | gentoo
--------------+---------------------------------+--------------+-------
[I]3.0.4      | + + + ~ + + + + + o o ~ + o ~ ~ | 6 o 3.0      | gentoo
   3.0.4-r1   | ~ ~ ~ ~ ~ ~ ~ ~ ~ o o ~ ~ o ~ ~ | 6 #          | gentoo
--------------+---------------------------------+--------------+-------
   3.0.4-r300 | ~ + ~ o ~ + + + ~ o o ~ + o ~ ~ | 6 o 3.0-gtk3 | gentoo
   3.0.4-r301 | ~ ~ ~ o ~ ~ ~ ~ ~ o o ~ ~ o ~ ~ | 6 o          | gentoo
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-03-18 14:17:21 UTC
1. Should this really be part of the dependency and not of the dependee?  I dare say there will be packages that are unaffected by the presence of tinfo, or any similar ABI-defining flag.

2. I'm strongly against adding anything else to SLOT.  Adding subslots there was an API catastrophe enough, with 'slot' suddenly starting to mean either 'just the slot' or 'slot+subslot', depending on the context.  This should really be stored separately.

3. All those reverse dependencies are horrible but I guess we're not going to lose much, given that subslots already force the lookup.
Comment 3 Ulrich Müller gentoo-dev 2019-03-21 15:14:05 UTC
It might be more systematic to add this as another type of USE dependency in the depending package, with a meaning like "any setting of the flag is fine, but reinstall this package when the flag changes in the dependency".

Unfortunately, the "cat/foo[bar=]" syntax is already taken.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-03-21 15:17:51 UTC
Make it 'bar@', with @ resembling shape of a binder ;-P.
Comment 5 Ulrich Müller gentoo-dev 2019-03-21 15:49:51 UTC
(In reply to Michał Górny from comment #4)
> Make it 'bar@', with @ resembling shape of a binder ;-P.

Not possible, because @ is a legal character in USE flag names:
"A USE flag name may contain any of the characters [A-Za-z0-9+_@-]. It must begin with an alphanumeric character."
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-19 08:33:47 UTC
https://bugs.gentoo.org/677292 is another example of ABI dependency on gtk+[wayland]. Once gtk+'s USE=wayland is flipped off many revdeps need a rebuild.
Comment 7 Esteve Varela Colominas 2021-12-11 23:32:19 UTC
I want to point out the relationship between net-im/telegram-desktop and media-libs/tg_owt would also benefit from a solution like this.
Currently this is being solved by propagating the USE flags to the (singular) dependant: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f02a6813a0fce67287cc49bf1ddcd2712da2389
But of course, this would quickly become unmanageable for bigger dependency trees.
Comment 8 amano.kenji 2024-04-17 01:01:29 UTC Comment hidden (spam)
Comment 9 Eli Schwartz gentoo-dev 2024-05-05 21:45:37 UTC
(In reply to Ulrich Müller from comment #3)
> It might be more systematic to add this as another type of USE dependency in
> the depending package, with a meaning like "any setting of the flag is fine,
> but reinstall this package when the flag changes in the dependency".
> 
> Unfortunately, the "cat/foo[bar=]" syntax is already taken.

The meaning of = also implies direct equality, which is indeed how it is currently used.

There's two cases here where the USE flag of the dependency changing implies reinstallation of revdeps:

- if the USE flag was originally set, and becomes unset, then the revdeps need to be rebuilt 

- if the USE flag was originally unset, but becomes set, then the revdeps need to be rebuilt

Also case 3:

- if the USE flag changes in either direction, then the revdeps need to be rebuilt.


But case 3 is exactly what [bar=] currently means. What we want is to handle the other two cases. In particular, case 1 is what we care about for at least this:

(In reply to Sergei Trofimovich (RETIRED) from comment #6)
> https://bugs.gentoo.org/677292 is another example of ABI dependency on
> gtk+[wayland]. Once gtk+'s USE=wayland is flipped off many revdeps need a
> rebuild.



It's not actually an ABI dependency, by the way. It's an automagic dependency. gtk+ provides extra symbols with USE=wayland, and many projects *detect* whether to build against that by checking... whether the symbols exist, rather than checking if a build option was passed to build against those symbols.

So we don't care if the symbols/dependency doesn't originally exist, but gets rebuilt to exist -- previously built packages automagically detect the absence of the feature and don't include that feature. We only need this one way.


Proposed spelling:

gtk+[wayland:?]

Like a slot dependency, it binds : to whatever version was installed at the time of building. Like a USE dependency, it binds ? to the state of the installed version only in the positive case, not the negative case.