From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OMTSU-0003PO-BR for garchives@archives.gentoo.org; Wed, 09 Jun 2010 22:09:17 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 952B4E092A; Wed, 9 Jun 2010 22:09:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3E080E08DF for ; Wed, 9 Jun 2010 22:09:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id CB4BC1B4092 for ; Wed, 9 Jun 2010 22:09:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -2.546 X-Spam-Level: X-Spam-Status: No, score=-2.546 required=5.5 tests=[AWL=0.053, BAYES_00=-2.599] 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 BbV8O0S35yb5 for ; Wed, 9 Jun 2010 22:08:53 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by smtp.gentoo.org (Postfix) with ESMTP id 5AF3E1B4129 for ; Wed, 9 Jun 2010 22:08:50 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OMTS1-000785-UN for gentoo-dev@gentoo.org; Thu, 10 Jun 2010 00:08:45 +0200 Received: from ip68-231-22-224.ph.ph.cox.net ([68.231.22.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Jun 2010 00:08:45 +0200 Received: from 1i5t5.duncan by ip68-231-22-224.ph.ph.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Jun 2010 00:08:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org connect(): No such file or directory From: Duncan <1i5t5.duncan@cox.net> Subject: [gentoo-dev] Re: LINGUAS handling Date: Wed, 9 Jun 2010 22:08:36 +0000 (UTC) Message-ID: References: <1276069107.16507.475.camel@tablet> <20100609192121.GA16981@boostbox> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ip68-231-22-224.ph.ph.cox.net User-Agent: Pan/0.133 (House of Butterflies; GIT 9895ed0 branch-testing) Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 9bd50613-b2be-46fd-a516-2e642f7d5804 X-Archives-Hash: f32de069c57bd94901634f784b61de7e Harald van D=C4=B3k posted on Wed, 09 Jun 2010 21:21:44 +0200 as excerpte= d: > Firstly, don't use =3D=3D with test. It's not portable. The bash built-= in > test supports =3D=3D. Other test implementations don't, such as the one= from > GNU coreutils, and the built-in test in other shells, don't. If you use > test in a context where you're absolutely sure the built-in version wil= l > be used, and the executing shell is bash, then I suppose you can use =3D= =3D, > but at that point you're better off using [[ ]] anyway. Good point about [[ ]]. > That said, to test if a variable is set, use ${VAR+set} over > ${VAR-unset}. ${VAR-unset} evaluates to "unset" if VAR is unset, and if > VAR is set to the string "unset". I suppose that's why you used %UNSET%= , > to reduce the possibility of accidents. You can reduce it to 0, using > for example >=20 > if [[ -z ${LINGUAS+set} ]]; then > # LINGUAS is unset > fi While we're talking style, a question (well, a couple): I've seen code like that posted frequently, but always wonder why the -z=20 is even used at all. Also, why use the if/then form? Is that Gentoo=20 style guidelines (like always using the brace-var form apparently is,=20 ${LINGUAS} vs. $LINGUAS)? Why not simply (: instead of # to avoid an=20 empty subshell): [[ ${LINGUAS} ]] || { : LINGUAS is unset } >> If yes, it's easy to write such code and put in eclass. If no, how do >> we live with inconsistency that some packages will install all >> languages some, will install nothing (document in handbook and add >> portage warning in case LINGUAS is unset?)? >=20 > Unfortunately, consistency either way is bad. Making unset LINGUAS > install nothing changes gettext's design, when the whole idea behind > LINGUAS was to mimic gettext's design. Making unset LINGUAS install > everything causes massive disk space requirements for the default > settings for some packages such as openoffice. In my opinion, either of > those would be worse than having LINGUAS behave inconsistently. ++ >> 3. What is the purpose of strip-linguas function > It's used for some packages that fail to build with certain LINGUAS > values. If I recall correctly, binutils had a bug where putting en_GB i= n > your LINGUAS made the build fail, for example. binutils doesn't support > en_GB anyway, so it gets filtered out, Here's a simple question I've wondered for awhile, not documented anywher= e=20 I could find, but should be. What do those of us who only speak English (whatever form, US is fine) pu= t=20 in LINGUAS, to ensure no "extras" we can't use anyway get installed? Currently, I have in one of my make.conf include files: LINGUAS=3D"en",=20 hoping to avoid the "everything installed" scenario above. But then on=20 binutils, I get the message "en" is not supported, which is fine, it=20 works, but with it stripped, does that mean it's installing unnecessary=20 language stuff that's of no use to me anyway? Should it be "en_US" or=20 "en_US.UTF-8" instead? Or maybe it should be simply "C"? A line or two in the l10n guide, plus possibly the handbook, telling what= =20 to set if "plain English" is "plain OK" to avoid the "unset installs it=20 all" problem, would be useful. And if there is no such single value available presently, as looks likely= ,=20 how big a project would it be to add it? Or perhaps an alternate=20 approach, a table of packages and the setting to be added to a file in=20 /etc/portage/env (or whatever), would be more appropriate? I haven't a=20 clue on this. Perhaps all I need is pointed at the right documentation,=20 but if so, that "right documentation" should probably be a bit more=20 visible, as I've certainly looked. --=20 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