From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1EKTtm-0004G4-Id for garchives@archives.gentoo.org; Wed, 28 Sep 2005 04:50:30 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id j8S4g4Vs012704; Wed, 28 Sep 2005 04:42:04 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id j8S4cVM1021414 for ; Wed, 28 Sep 2005 04:38:31 GMT Received: from zh034158.ppp.dion.ne.jp ([222.3.34.158] helo=opteron246.suzuki-stubbs.home) by smtp.gentoo.org with esmtpa (Exim 4.43) id 1EKTp5-0002Sg-Ql for gentoo-dev@lists.gentoo.org; Wed, 28 Sep 2005 04:45:40 +0000 Received: by opteron246.suzuki-stubbs.home (Postfix, from userid 1000) id 4EEB6248949; Wed, 28 Sep 2005 13:45:53 +0900 (JST) From: Jason Stubbs 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 User-Agent: KMail/1.8.91 References: <200509271823.25788.jstubbs@gentoo.org> <200509281258.20894.jstubbs@gentoo.org> <433A19DA.5060401@gentoo.org> In-Reply-To: <433A19DA.5060401@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509281345.53152.jstubbs@gentoo.org> X-Archives-Salt: 6192d4ee-abfc-4c16-bc98-81007b8f0fff X-Archives-Hash: 10c77d76f877d048bfa0e98dd503ca00 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