public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Marius Mauch <genone@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: use flags -> use options
Date: Mon, 8 Oct 2007 21:40:58 +0200	[thread overview]
Message-ID: <20071008214058.3d647e4e.genone@gentoo.org> (raw)
In-Reply-To: <470A1840.10505@gentoo.org>

On Mon, 08 Oct 2007 13:45:04 +0200
"Marijn Schouten (hkBst)" <hkBst@gentoo.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Marius Mauch wrote:
> >>> "Marijn Schouten (hkBst)" <hkBst@gentoo.org>:
> >>>> I imagine there are a lot more cases where the simple on/off
> >>>> system we have now is suboptimal. I could be wrong of course.
> >>>> Please comment.
> >>>  This key=value systems sounds interesting.  Another use could be
> >>> the choice between xulrunner, seamonkey, firefox. 
> > 
> > We already have this with USE_EXPAND. Not exactly the same syntax,
> > but I don't see a terrible problem in that, and we don't have to
> > fix all three trillion related tools to handle it. Unless you can
> > come up with a case that can't be handled with USE_EXPAND.
> 
> No, USE_EXPAND is only a way to abbreviate use flags with a common
> substring in their name, such as "impl_guile impl_sbcl impl_clisp"
> which could be encoded interchangeably as either
> 
> # without USE_EXPAND
> IUSE="impl_guile impl_sbcl impl_clisp"
> 
> or
> 
> # with USE_EXPAND
> for impl in IMPL; do IUSE+="impl_${impl}"; done
> 
> but the effect is that there are 3 use flags with a total of 2^3=8
> combinations, while really something with exactly 3 combinations is
> needed:
> 
> IUSE="impl"
> 
> case ${impl} in
> 	guile)  #use guile as backend
> 	 sbcl)  #use sbcl  as backend
> 	clisp)  #use clisp as backend

So what you want is a USE_EXPAND version that only allows one value
per variable. That wouldn't be terribly difficult to do.
As for your idea (ignoring implementation issues), I'd expect that
sooner or later people will request multivalue functionality as well,
so we'd have the same situation there. Also in the given example, how
would the user/package manager actually know what values were
valid/available for "impl"?

Marius
-- 
gentoo-dev@gentoo.org mailing list



  parent reply	other threads:[~2007-10-08 19:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <47090820.7060506@gentoo.org>
2007-10-07 18:09 ` [gentoo-dev] Re: use flags -> use options Christian Faulhammer
2007-10-07 19:12   ` Tobias Klausmann
2007-10-07 22:00     ` Jan Kundrát
2007-10-08  4:17       ` Drake Wyrm
2007-10-08  2:43     ` Marius Mauch
2007-10-08 11:45       ` Marijn Schouten (hkBst)
2007-10-08 14:40         ` Ryan Hill
2007-10-08 14:48           ` Marijn Schouten (hkBst)
2007-10-08 19:40         ` Marius Mauch [this message]
2007-10-09 10:20           ` Marijn Schouten (hkBst)

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=20071008214058.3d647e4e.genone@gentoo.org \
    --to=genone@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