From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Iavfy-00038G-11 for garchives@archives.gentoo.org; Thu, 27 Sep 2007 15:53:18 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l8RFfk96024528; Thu, 27 Sep 2007 15:41:46 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l8RFb9WU015855 for ; Thu, 27 Sep 2007 15:37:10 GMT Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 2E85864BAA for ; Thu, 27 Sep 2007 15:37:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: 0.189 X-Spam-Level: X-Spam-Status: No, score=0.189 required=5.5 tests=[AWL=0.721, BAYES_00=-2.599, RCVD_NUMERIC_HELO=2.067] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t8jyFUoi1TC2 for ; Thu, 27 Sep 2007 15:37:03 +0000 (UTC) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id AE45A64E95 for ; Thu, 27 Sep 2007 15:36:54 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IavId-0003NU-HD for gentoo-dev@gentoo.org; Thu, 27 Sep 2007 15:29:11 +0000 Received: from 91.84.66.56 ([91.84.66.56]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Sep 2007 15:29:11 +0000 Received: from slong by 91.84.66.56 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Sep 2007 15:29:11 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Steve Long Subject: [gentoo-dev] Re: Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild Date: Thu, 27 Sep 2007 16:30:45 +0100 Message-ID: References: <200709260451.16087.vapier@gentoo.org> <20070926090348.GN22279@supernova> <200709260514.12474.vapier@gentoo.org> <20070926093033.GP22279@supernova> 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=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 91.84.66.56 User-Agent: KNode/0.10.4 Sender: news X-Archives-Salt: e0c0ec81-1384-44db-a7b2-38d705939d8c X-Archives-Hash: 5df9881ca78f56e100cfc162714a6068 Donnie Berkholz wrote: > On 05:14 Wed 26 Sep , Mike Frysinger wrote: >> if it's all common shell, it's pretty hard to hide ... you could try some >> tricks like rewriting USE to __USE__ so internal code (like the `use` >> function) still work, but in the end, does that really help ? > > I think so. It explicitly says that's private and not part of the API, > and it makes accidental overwrites much more unlikely. > Yeah but if it's been declare'd -r (readonly) that isn't an issue. Personally I think access to all the variables is fine; an ebuild is a shell-script, not a C++ project, and if a dev breaks something it's his responsibility to fix it. (Quite apart from this review process picking stuff up.) My 2c on that. Wrt to the function, I'd define it so: use_linguas() { (($#)) || die 'use_linguas() called with no arguments' ALL_LINGUAS= local lingua for lingua; do use "linguas_$lingua" && ALL_LINGUAS+=" $lingua" done # [[ $ALL_LINGUAS ]] || die 'No Linguas available' [[ $ALL_LINGUAS ]] && return 0 # ALL_LINGUAS=en # default to English return 1 } ..to call with use_linguas de en es it zh # for example It'd be easier to maintain if the ebuild author wrote: MY_LINGUAS='de en es it zh' ..at the top of the file, with calls to: use_linguas $MY_LINGUAS ..where needed. -- gentoo-dev@gentoo.org mailing list