From: "Alec Warner" <antarus@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI
Date: Sun, 21 Sep 2008 18:35:04 -0700 [thread overview]
Message-ID: <b41005390809211835h39f5a359k571e9693f7db1630@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0809210744400.20111@wmax001.mathematik.uni-wuerzburg.de>
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.
>
>
next prev parent reply other threads:[~2008-09-22 1:35 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bcwiO-7zO-1@gated-at.bofh.it>
[not found] ` <be8YL-33V-3@gated-at.bofh.it>
[not found] ` <be9Lf-478-5@gated-at.bofh.it>
2008-09-21 6:18 ` [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI Vaeth
2008-09-21 11:44 ` Thomas Anderson
2008-09-21 12:03 ` [gentoo-dev] " Steve Long
2008-09-21 13:04 ` [gentoo-dev] " Ulrich Mueller
2008-09-21 17:30 ` Kent Fredric
2008-09-21 18:50 ` Ulrich Mueller
2008-09-21 20:23 ` Steve Long
2008-09-21 20:46 ` Ulrich Mueller
2008-09-21 21:10 ` Steve Long
2008-09-23 19:39 ` Thomas Sachau
2008-09-23 23:21 ` Bo Ørsted Andresen
2008-09-24 5:28 ` Alec Warner
2008-09-24 9:01 ` Bo Ørsted Andresen
2008-09-24 7:46 ` Nirbheek Chauhan
2008-09-27 10:17 ` Thomas Sachau
2008-09-28 18:24 ` [gentoo-dev] Usage of econf with an additional || die Thomas Sachau
2008-09-28 18:28 ` Vlastimil Babka
2008-09-30 6:55 ` Peter Volkov
2008-09-30 10:36 ` Ben de Groot
2008-09-30 12:03 ` Jeremy Olexa
2008-09-30 16:47 ` Thomas Sachau
2008-09-30 17:10 ` Matthias Schwarzott
2008-09-30 10:39 ` Zac Medico
2008-09-29 5:16 ` [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI Nirbheek Chauhan
2008-09-30 17:05 ` Petteri Räty
2008-10-05 8:52 ` [gentoo-dev] " Ulrich Mueller
2008-10-05 14:15 ` Robert Buchholz
2008-10-05 15:45 ` Ulrich Mueller
2008-10-05 16:47 ` Robert Buchholz
2008-10-05 17:03 ` Ulrich Mueller
2008-10-05 17:58 ` Thomas Sachau
2008-09-24 0:35 ` [gentoo-dev] " Robert Buchholz
2008-09-24 8:26 ` Santiago M. Mola
2008-09-24 1:34 ` [gentoo-dev] " Steve Long
2008-09-24 6:38 ` [gentoo-dev] " Ulrich Mueller
2008-09-24 16:21 ` [gentoo-dev] OT: " Steve Long
2008-09-24 16:33 ` [gentoo-dev] " Steve Long
2008-09-24 6:40 ` [gentoo-dev] " Duncan
2008-09-22 1:35 ` Alec Warner [this message]
2008-09-22 8:22 ` Duncan
[not found] <beqsE-8pJ-13@gated-at.bofh.it>
[not found] ` <beqsE-8pJ-15@gated-at.bofh.it>
[not found] ` <beqsE-8pJ-17@gated-at.bofh.it>
[not found] ` <beqsD-8pJ-11@gated-at.bofh.it>
[not found] ` <bew51-7fR-11@gated-at.bofh.it>
2008-09-21 22:11 ` [gentoo-dev] " Vaeth
2008-09-22 0:35 ` [gentoo-dev] " Steve Long
2008-09-22 8:25 ` [gentoo-dev] " Duncan
2008-09-16 0:01 [gentoo-dev] Bugzilla3 and Bugzilla Survey 2008 Robin H. Johnson
2008-09-20 11:31 ` [gentoo-dev] Default src_install for EAPI-2 or following EAPI Thomas Sachau
2008-09-20 12:12 ` [gentoo-dev] " Steve Long
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=b41005390809211835h39f5a359k571e9693f7db1630@mail.gmail.com \
--to=antarus@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