Gentoo Archives: gentoo-dev

From: "Harald van Dijk" <truedfx@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [RFC] base.eclass
Date: Sun, 03 Jan 2010 11:00:38
Message-Id: 20100103110037.GA29047@boostbox
In Reply to: Re: [gentoo-dev] Re: [RFC] base.eclass by Ulrich Mueller
1 On Sun, Jan 03, 2010 at 11:28:27AM +0100, Ulrich Mueller wrote:
2 > >>>>> On Sun, 3 Jan 2010, Harald van Dijk wrote:
3 >
4 > >> > 65 base_src_util $@
5 > >> This is not problem
6 >
7 > > Only because you can be sure there will be exactly one word in the
8 > > result, which will not be split. In general, $@ should be quoted, and it
9 > > would be a good idea to either do it here too even though it's not
10 > > strictly necessary, or make the intent clearer and just write
11 >
12 > > base_src_util $1
13 >
14 > I think this would not be correct. Note the while loop over parameters
15 > in base_src_util.
16
17 You're right. I'm so used to src_unpack normally not having any arguments
18 that I didn't stop to think base_src_unpack could easily be called
19 explicitly, with as many parameters as you'd like. Checking shows this
20 is not done in the tree (never more than one parameter, and usually
21 zero), but that's no reason to drop it. :)
22
23 > So it should be "$@" (with quotes).
24
25 That'd be better, but my point still stands: the arguments to
26 base_src_unpack won't ever contain anything that can be expanded, so quoting
27 isn't strictly necessary, just a good idea.
28
29 Not that I'm against the quoting, of course.