From: Jason Stubbs <jstubbs@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Dirt: To shove under the rug or not shove under the rug? (aka another round of USE_EXPAND)
Date: Wed, 28 Sep 2005 13:45:53 +0900 [thread overview]
Message-ID: <200509281345.53152.jstubbs@gentoo.org> (raw)
In-Reply-To: <433A19DA.5060401@gentoo.org>
On Wednesday 28 September 2005 13:19, Donnie Berkholz wrote:
> Jason Stubbs wrote:
> | What are the exact reasons for not wanting to put the expanded flags
> | directly into IUSE? If it's just a matter of the horrid display existing
> | tools would give, the functionality can go in and IUSE updated after the
> | functional versions are stabled. Are there any reasons beyond that?
>
> It's useful to group things logically like this. You don't need to worry
> about forgetting to add in variables like:
>
> IUSE_VIDEO_CARDS="foo bar"
> IUSE="${IUSE_VIDEO_CARDS} baz bop"
>
> Particularly when you start doing things in eclasses as well as ebuilds,
> this gets worrisome. It's also more aesthetically pleasing. And it
> creates a logical parallel with the user-set variables in make.conf.
iuse_expand()
{
VAR="`echo $1 | awk '{print tolower($0)}'`"
shift
for FLAG in "$@"; do
IUSE="${IUSE} ${VAR}_${FLAG}"
done
export IUSE
}
IUSE="baz bop"
iuse_expand VIDEO_CARDS foo bar
> In addition, it saves IUSE from having super-long flags:
>
> IUSE="video_cards_foo video_cards_bar video_cards_baz ... " -- picture
> that repeated 10 times. It's just plain ugly and overly long.
It doesn't save anything because internally it needs to be done that way
regardless. The only difference between the two patches is that one has
IUSE="..." and the other has IUSE_EXPAND="...".
> Most importantly IMHO, it suggests that users should set
> USE="video_cards_foo" instead of VIDEO_CARDS="foo".
Users don't see it either way, so I can't see how it suggests anything.
--
Jason Stubbs
--
gentoo-dev@gentoo.org mailing list
next prev parent reply other threads:[~2005-09-28 4:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-27 9:23 [gentoo-dev] Dirt: To shove under the rug or not shove under the rug? (aka another round of USE_EXPAND) Jason Stubbs
2005-09-27 9:38 ` Diego 'Flameeyes' Pettenò
2005-09-27 10:12 ` Jason Stubbs
2005-09-27 10:41 ` Diego 'Flameeyes' Pettenò
2005-09-27 12:51 ` Jason Stubbs
2005-09-27 13:44 ` Diego 'Flameeyes' Pettenò
2005-09-27 14:07 ` Kito
2005-09-27 16:27 ` Stephen Bennett
2005-09-27 16:48 ` Brian Harring
2005-09-27 14:25 ` Jason Stubbs
2005-09-27 15:40 ` [gentoo-dev] " Duncan
2005-09-27 12:38 ` [gentoo-dev] " Chris Gianelloni
2005-09-27 15:36 ` Donnie Berkholz
2005-09-27 10:54 ` Thomas de Grenier de Latour
2005-09-27 12:31 ` Jason Stubbs
2005-09-27 12:35 ` Chris Gianelloni
2005-09-27 13:07 ` Thomas de Grenier de Latour
2005-09-27 13:50 ` Chris Gianelloni
2005-09-27 14:20 ` Jason Stubbs
2005-09-27 15:35 ` Donnie Berkholz
2005-09-28 1:23 ` Jason Stubbs
2005-09-28 3:13 ` Jason Stubbs
2005-09-28 3:58 ` Jason Stubbs
2005-09-28 4:19 ` Donnie Berkholz
2005-09-28 4:45 ` Jason Stubbs [this message]
2005-09-28 6:23 ` Donnie Berkholz
2005-09-28 8:03 ` Jason Stubbs
2005-09-28 4:21 ` Jason Stubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200509281345.53152.jstubbs@gentoo.org \
--to=jstubbs@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox