From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-dev+bounces-32838-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1KhaKR-0003RD-1C
	for garchives@archives.gentoo.org; Mon, 22 Sep 2008 01:35:07 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C1334E03BA;
	Mon, 22 Sep 2008 01:35:05 +0000 (UTC)
Received: from yw-out-1718.google.com (yw-out-1718.google.com [74.125.46.157])
	by pigeon.gentoo.org (Postfix) with ESMTP id 9F4A9E03BA
	for <gentoo-dev@lists.gentoo.org>; Mon, 22 Sep 2008 01:35:05 +0000 (UTC)
Received: by yw-out-1718.google.com with SMTP id 5so201798ywm.46
        for <gentoo-dev@lists.gentoo.org>; Sun, 21 Sep 2008 18:35:04 -0700 (PDT)
Received: by 10.100.152.11 with SMTP id z11mr2344062and.112.1222047304474;
        Sun, 21 Sep 2008 18:35:04 -0700 (PDT)
Received: by 10.100.94.12 with HTTP; Sun, 21 Sep 2008 18:35:04 -0700 (PDT)
Message-ID: <b41005390809211835h39f5a359k571e9693f7db1630@mail.gmail.com>
Date: Sun, 21 Sep 2008 18:35:04 -0700
From: "Alec Warner" <antarus@gentoo.org>
Sender: antarus@scriptkitty.com
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
In-Reply-To: <Pine.LNX.4.64.0809210744400.20111@wmax001.mathematik.uni-wuerzburg.de>
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
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
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <bcwiO-7zO-1@gated-at.bofh.it> <be8YL-33V-3@gated-at.bofh.it>
	 <be9Lf-478-5@gated-at.bofh.it>
	 <Pine.LNX.4.64.0809210744400.20111@wmax001.mathematik.uni-wuerzburg.de>
X-Google-Sender-Auth: 6564ae896748cf3a
X-Archives-Salt: 3d74f258-eb88-4e79-8035-024c755db72d
X-Archives-Hash: 22f34a6958195b6d79d41e156202c995

On Sat, Sep 20, 2008 at 11:18 PM, Vaeth
<vaeth@mathematik.uni-wuerzburg.de> wrote:
> Steve Long wrote:
>
>> Thomas Sachau wrote: [...]
>>
>> > [[ -n ${DOCS} ]] && dodoc ${DOCS}
> [...]
>>
>> It might be wise to use an array for DOCS there
>
> Since I have now seen suggestions for using arrays unnecessarily
> at least twice (see also
>  [RFC] Ability to pass arguments to src_configure/src_compile
> but I am only speaking about the usage of _arrays_ here),
> let me remark that the more clever way to this is
>
>  [ -n "${DOCS}" ] && eval "dodoc ${DOCS}"
>
> This way, people can simply quote as they like:
>
> DOCS="'filename with spaces' filename_without_space doc/*"
>
> or also
>
> DOCS="just_one_filename_without_special_characters"
>
> or also - when Push from /usr/bin/functions-eix.sh is used
> (which might be implemented simpler without using other functions):
>
> Push DOCS 'filename with spaces' filename_without_space "${S}"/doc/*
>
>
> Not only has this the advantage that it is POSIX (and thus does not
> force ebuilds to use the particular shell "bash" - a policy which perhaps
> some day might be changed: It is dangerous to depend on a particular
> implementation), the array-less solution is also much simpler to
> implement, easy to understand from the source, and clearer in usage.
> Case distinctions like

gentoo-x86 uses bash; the ebuilds, the eclasses, they all rely on it.
I'm pretty sure most package managers rely on bash as well, but I have
not looked at the code outside of portage to verify.

I really dislike ideas where the compelling argument is 'in the future
we may make a specific decision and that makes that one choice
easier.'  If switching to POSIX shell was on the road map for Gentoo
or Gentoo-x86 or any of the package managers; I would maybe buy your
argument.  But as far as I am aware it is not; so planning for future
decisions that currently are undecided is folly in my mind.

It is much more pragmatic to use bash now (since we already use it)
and utilize its features.

If you have a compelling argument for switching the entire tree to
POSIX then give it; however I'm pretty sure it is a difficult argument
to make (Uberlord tried to make it in the past and did not succeed).
Otherwise lets just roll with the bash implementation.

-Alec


>
>> isArr() [[ $(declare -p "$1" 2>/dev/null) = 'declare -a'* ]]
>> if isArr DOCS; then
>>    ((${#DOCS[@]})) && dodoc "${DOCS[@]}"
>> else [[ $DOCS ]] && dodoc $DOCS
>> fi
>
> are just awful.
>
>