Gentoo Archives: gentoo-dev

From: "Haelwenn (lanodan) Monnier" <contact@×××××××××.me>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Underscores in USE flags
Date: Fri, 20 Sep 2019 19:03:34
Message-Id: 20190920190324.GA31594@cloudsdale.the-delta.net.eu.org
In Reply to: Re: [gentoo-dev] Underscores in USE flags by Mike Gilbert
1 [2019-09-20 13:24:45-0400] Mike Gilbert:
2 > On Fri, Sep 20, 2019 at 12:55 PM Michał Górny <mgorny@g.o> wrote:
3 > > On Fri, 2019-09-20 at 12:41 -0400, Mike Gilbert wrote:
4 > > > On Fri, Sep 20, 2019 at 12:11 PM Michał Górny <mgorny@g.o> wrote:
5 > > > > On Fri, 2019-09-20 at 11:46 -0400, Mike Gilbert wrote:
6 > > > > > Recently, a large number of bugs were filed against packages that have
7 > > > > > USE flag names which contain underscores. Apparently PMS prohibits
8 > > > > > this except when the USE flag is part of a USE_EXPAND variable.
9 > > > > >
10 > > > > > https://projects.gentoo.org/pms/7/pms.html#x1-200003.1.4
11 > > > > >
12 > > > > > I'm not certain when this text was added to PMS, or how many of the
13 > > > > > affected USE flags pre-date this policy.
14 > > > > >
15 > > > > > Portage seems to have no issue dealing with underscores, so this
16 > > > > > doesn't seem to be solving any technical problem.
17 > > > > >
18 > > > > > I am pretty sure that renaming a bunch of USE flags will cause some
19 > > > > > amount of end-user confusion, for very little benefit. Is enforcing
20 > > > > > this part of PMS really worth it?
21 > > > >
22 > > > > And having packages with pretended-USE_EXPAND-that-does-not-work-as-
23 > > > > USE_EXPAND is less confusing to the users?
24 > > >
25 > > > I doubt users immediately think "USE_EXPAND" when they see an underscore.
26 > > >
27 > > > Portage's seems fairly unambiguous to me. For example:
28 > > >
29 > > > % emerge -pv1O app-misc/foo
30 > > >
31 > > > These are the packages that would be merged, in order:
32 > > >
33 > > > [ebuild N ] app-misc/foo-0::local USE="-modern_kernel"
34 > > > PYTHON_TARGETS="python3_7" VIDEO_CARDS="radeon" 0 KiB
35 > > >
36 > > > Total: 1 package (1 new), Size of downloads: 0 KiB
37 > > >
38 > > > I don't think anyone would mistake "modern_kernel" for a USE_EXPAND
39 > > > value given the above.
40 > >
41 > > Look at the humongous list of flags on dev-libs/aws-sdk-cpp. They all
42 > > start with 'aws_targets' which is a clear attempt to emulate USE_EXPAND.
43 > > Expect that they won't work as USE_EXPAND, user typing:
44 > >
45 > > AWS_TARGETS="foo bar baz"
46 > >
47 > > will just wildly confused, and in the end this prefixing is just silly
48 > > and causes the flag names to become awfully long.
49 >
50 > Ok, so you chery-picked one particularly horrible example. The Portage
51 > output still puts them in USE="" section, though the user probably
52 > won't see that given the massive USE flag list.
53 >
54 > My point still stands for many of the other packages in the repo that
55 > don't have several dozen flags.
56
57 While that's true for portage, it is false for gentoolkit with the
58 `equery u <atom>` command.
59
60 Following your original example it would be something like:
61
62 % equery y app-misc/foo
63 [ Legend : U - final flag setting for installation]
64 [ : I - package is installed with flag ]
65 [ Colors : set, unset ]
66 * Found these USE flags for app-misc/foo-0::local
67 U I
68 - - modern_kernel : Install init scripts for 3.18 or higher kernels with atomic rule updates
69 + + python_targets_python3_7 : Build with Python 3.7
70 - - video_cards_radeon : VIDEO_CARDS setting to build driver for ATI radeon video cards
71
72 And with a bunch more of USE flags (not with having to go to extremes like
73 dev-libs/aws-sdk-cpp) it is very confusing a lot of time on machines where
74 app-portage/eix would be overkill I had to check on another machine.

Replies

Subject Author
Re: [gentoo-dev] Underscores in USE flags Mike Gilbert <floppym@g.o>