Mailing List Archive

Two-level USE-flag system VAR: USE="minimal" for kernel sources
On Wed, 2005-09-21 at 18:07 -0400, Alec Warner wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Tom Fredrik Blenning Klaussen wrote:
> > On Thu, 2005-09-08 at 20:01 +0100, John Mylchreest wrote:
> >
> >>For the record, there is a bug open for this. (#64009)
> >>Personally, I'm not keen on the idea.
> >>the only way which we can do this is by detecting which arch we are
> >>installing the sources, for, which immediately means many installs of
> >>USE=minimal are not the same.
> >
> >
> > I'm the reporter of the above mentioned bug (which for the record
> > was /only 1 year old/ September 14. I love the response time :-) )
> > I was just made aware of this discussion, so sorry about the late
> > response.
> >
> > I really can't see the problem with several installs being dissimilar.
> >
> >
> >>There are plenty of other reasons I can go into, but if anyone feels
> >>strongly to push this change, then feel free to reply with justification
> >>as to why. Technical info to back it up as well please :)
> >
> >
> > The only real difficulty I can see is that the kernel-devs sometimes
> > pull includes from other arcs. This will cause compile errors, and under
> > no circumstances any runtime problems. If the use flag also comes with a
> > warning that use is on your own peril, and support is not given. Too bad
> > for the people ignoring the warning.
> I could see some sort of pmasked ebuild that did this. Other than that
> though, I wouldn't want users to be able to touch it. It's well known
> that pmasked stuff isn't supported. One can't add a use flag to an
> ebuild and then turn around and say oh that use flag isn't supported.
> If it's not supported it shouldn't be there.

Actually a method for masking USE flags could be a good idea. Now, as
said earlier the natural way to do this is in the kernel-2.eclass. So I
don't see how one could pmask that.

Why are you afraid of users coming near this. I don't expect this to
break anything at all, but even if the errors generated are straight
forward. The average gentoo users are not stupid. In fact if you have
come so far as to adjust something beyond the most basic USE flags at
all, you're probably advanced enough to deciphre such a message. (It
would be nice to have some knowledge of who the average gentoo user is
though.)

Now as for the USE flag system. It has actually become so big that it's
difficult to use it effectively. I would actually suggest that a two
level system of USE flags could be employed. Something like
wtk/gtk (Windowing Toolkit / gtk)
wtk/kde (Windowing Toolkit / kde)

There could also be another category
experimental/minimal

Using a flag from experimental would add a warning to the pacakge that
uses it, and an implicit understanding that tweaking of the experimental
use flags is strongly discouraged.

> Also might want to submit the ebuild to breakmygentoo or some other
> overlay.

I'll consider it, but as mentioned above it's really a change to an
eclass.

Sincerely
--
Tom Fredrik Klaussen
--
gentoo-dev@gentoo.org mailing list
Re: Two-level USE-flag system VAR: USE="minimal" for kernel sources [ In reply to ]
Tom Fredrik Blenning Klaussen wrote:

> The average gentoo users are not stupid.
Many people would not agree with that statement ;)

> come so far as to adjust something beyond the most basic USE flags at
> all, you're probably advanced enough to deciphre such a message. (It
> would be nice to have some knowledge of who the average gentoo user is
> though.)
>
> Now as for the USE flag system. It has actually become so big that it's
> difficult to use it effectively.
There is a USE flag group GLEP that is being implemented...sometime ;)
I don't think masking USE flags has come up...*pokes portage people*
>>Also might want to submit the ebuild to breakmygentoo or some other
>>overlay.
>
>
> I'll consider it, but as mentioned above it's really a change to an
> eclass.
You can put eclasses in the overlay as well IIRC.

-Alec Warner (antarus)
--
gentoo-dev@gentoo.org mailing list
Re: Two-level USE-flag system VAR: USE="minimal" for kernel sources [ In reply to ]
On Friday 23 September 2005 05:28, Tom Fredrik Blenning Klaussen wrote:
> Now as for the USE flag system. It has actually become so big that it's
> difficult to use it effectively. I would actually suggest that a two
> level system of USE flags could be employed. Something like
> wtk/gtk (Windowing Toolkit / gtk)
> wtk/kde (Windowing Toolkit / kde)

This is just arbitrary grouping as far as USE flags themselves go. Rather
than changing the name of the flags, why not just split the flags that are
in use.desc into categories separated by comments?

# some category
use ...
use ...
...

# Windowing Toolkits
gtk ...
kde ...

# some other category
...

--
Jason Stubbs
Re: Two-level USE-flag system VAR: USE="minimal" for kernel sources [ In reply to ]
On Thu, 22 Sep 2005 22:28:35 +0200
Tom Fredrik Blenning Klaussen <bfg-gentoo@blenning.no> wrote:

> Now as for the USE flag system. It has actually become so big
> that it's difficult to use it effectively. I would actually
> suggest that a two level system of USE flags could be employed.
> Something like
> wtk/gtk (Windowing Toolkit / gtk)
> wtk/kde (Windowing Toolkit / kde)

Sounds good on this example, but i'm not sure it would be that easy
and meaningfull on the whole use.desc. I think you would end up
with lot of "this flag should be in that category and not in this
one" discussions (what already happen with packages). Also, i
would be curious to see the output of an "emerge -pv" on some
highly configurable packages (dev-lang/php comes to mind for
instance), and whether it really improves readibility.

> There could also be another category
> experimental/minimal

If the idea is just to give a "don't use this flag but if you know
what you are doing" warning, then the best imho is simply to
use.mask it in base profile. And people who know what they are
doing can unmask it from their /etc/portage/profile/use.mask
(syntax is "-flag"). Sure, it should not be named "minimal" in that
case, since "minimal" is not something you want to mask, but rather
"mini-kernel-src" or anything else that sounds like a specific flag.

--
TGL.
--
gentoo-dev@gentoo.org mailing list
Re: Re: Two-level USE-flag system VAR: USE="minimal" for kernel sources [ In reply to ]
On Friday 23 September 2005 15:36, Duncan wrote:
> OTOH, it's obviously yet /another/ thing for portage devs to work on, and
> portage is /supposed/ to be in feature request freeze ATM... I like the
> idea, but whether the benefits of putting it on the current feature list
> outweigh the costs of putting it off, is something I'm not going to even
> pretend I want to evaluate. =8^| If you portage devs believe it's easy
> to "make it so", perhaps further discussion is warranted. If not, I'm
> not in favor of putting off the next portage yet /again/ to make it
> happen, tho it'd certainly be nice to have, so I'd say it's not even
> worth further discussion ATM. JMHO...

There's absolutely no work required on portage to support USE flag
"categories". There's nothing preventing a "/" character from appearing in
a USE flag, hence the support is there already. The work would come in
adjusting every ebuild to use the different name as well as killing
backward compatibility with already installed packages and binary packages.

--
Jason Stubbs
Re: Two-level USE-flag system VAR: USE="minimal" for kernel sources [ In reply to ]
Jason Stubbs posted <200509231019.16895.jstubbs@gentoo.org>, excerpted
below, on Fri, 23 Sep 2005 10:19:14 +0900:

> On Friday 23 September 2005 05:28, Tom Fredrik Blenning Klaussen wrote:
>> Now as for the USE flag system. It has actually become so big that it's
>> difficult to use it effectively. I would actually suggest that a two
>> level system of USE flags could be employed. Something like
>> wtk/gtk (Windowing Toolkit / gtk)
>> wtk/kde (Windowing Toolkit / kde)
>
> This is just arbitrary grouping as far as USE flags themselves go. Rather
> than changing the name of the flags, why not just split the flags that are
> in use.desc into categories separated by comments?
>
> # some category
> use ...
> use ...
> ...
>
> # Windowing Toolkits
> gtk ...
> kde ...
>
> # some other category
> ...

The problem as I see it with comment-categories for USE flags is that it
doesn't well match how USE flags (and looking up USE flag descriptions)
are actually used.

TFBKlaussen's proposal would make it immediately obvious from an emerge
--verbose --ask (or --pretend) what category was involved. Commenting
use.desc (and use.local.desc) doesn't have that advantage.

Additionally, when I look up a description, it's usually by grepping
use.(local.)desc, and I suppose many others work similarly. I/we don't
care about all the /other descriptions, only the one we are wondering
about. Putting additional information in a comment line ?? lines above
the flag and description in question would /not/ be helpful. OTOH, using
a category/flag arrangement would be somewhat of a description of its own,
meaning the description could be shortened, and the line would be no
longer than it is currently. (With 80-char screen widths, this can be an
issue.)

OTOH, it's obviously yet /another/ thing for portage devs to work on, and
portage is /supposed/ to be in feature request freeze ATM... I like the
idea, but whether the benefits of putting it on the current feature list
outweigh the costs of putting it off, is something I'm not going to even
pretend I want to evaluate. =8^| If you portage devs believe it's easy
to "make it so", perhaps further discussion is warranted. If not, I'm
not in favor of putting off the next portage yet /again/ to make it
happen, tho it'd certainly be nice to have, so I'd say it's not even worth
further discussion ATM. JMHO...

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html


--
gentoo-dev@gentoo.org mailing list
Re: Re: Two-level USE-flag system VAR: USE="minimal" for kernel sources [ In reply to ]
Jason Stubbs posted <200509231644.47078.jstubbs@gentoo.org>, excerpted
below, on Fri, 23 Sep 2005 16:44:44 +0900:

> There's absolutely no work required on portage to support USE flag
> "categories". There's nothing preventing a "/" character from appearing in
> a USE flag, hence the support is there already.

It's not treated as some sort of metacharacter or otherwise currently
input filtered, then, I take it.

> The work would come in adjusting every ebuild to use the different
> name as well as killing backward compatibility with already installed
> packages and binary packages.

... and existing make.confs and package.uses, of course... Good point.

It'd certainly be lots of work, and I can envision the discussions over
whether various flags belong in this or that category, and where to put
the ones that don't seem to fit a category, but it might be worth it in
terms of clarity and ease of use (or maybe not, as the PHP example points
out).

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html


--
gentoo-dev@gentoo.org mailing list