Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Cc: Duncan <1i5t5.duncan@×××.net>
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
Date: Sun, 05 Apr 2009 08:01:22
Message-Id: 200904050401.19301.vapier@gentoo.org
In Reply to: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass by Duncan <1i5t5.duncan@cox.net>
1 On Sunday 05 April 2009 03:49:52 Duncan wrote:
2 > Mike Frysinger <vapier@g.o> posted
3 > >> + local sources="$@"
4 > >
5 > > this doesnt do what you think it does. it's the same as "$*" which
6 > > means this function does not handle quoted arguments properly.
7 >
8 > ??
9 >
10 > I'm confused. Maybe you meant something different, but quoting the bash
11 > manpage (reformatted slightly to emphasize the difference, this is the
12 > 4.0, 2009 February 7 manpage version, but a quick google indicates the
13 > same difference applies in the POSIX shell spec well... it's not new):
14
15 what you've read/quoted matters at the expansion step, but that isnt what i'm
16 talking about. i'm pointing out that the expansion is lost by assigning
17 through the variable. thus the same behavior of the whole function is as if
18 "$*" is used.
19
20 trivial example:
21 set -- a "b c" d
22 printf "{%s} " "$@" ; echo
23 sources="$@"
24 printf "{%s} " "$sources" ; echo
25 printf "{%s} " $sources ; echo
26 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies