Gentoo Archives: gentoo-dev

From: Ferris McCormick <fmccor@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] New eclass: emul-linux-x86.eclass
Date: Wed, 14 Nov 2007 14:15:28
Message-Id: 1195049441.2705.191.camel@liasis.inforead.com
In Reply to: Re: [gentoo-dev] New eclass: emul-linux-x86.eclass by Torsten Rehn
1 On Wed, 2007-11-14 at 14:53 +0100, Torsten Rehn wrote:
2 > On Wednesday 14 November 2007 14:21, you wrote:
3 > > But why is it standard to quote other assignments like in DESCRIPTION and
4 > > HOMEPAGE then?
5 >
6 > When assigning literal values as in DESCRIPTION and HOMEPAGE, you have to
7 > quote. ${WORKDIR} is quoted on its assignment and therefore does not have to
8 > be quoted when assigning its value to another variable (${S}) by reference.
9 >
10
11 Note, however, that for example in /usr/lib/portage/bin/ebuild.sh, it's
12 always quoted (except once, which looks like an oversight). Example:
13
14 ebuild.sh:1081: if [ "${PORTAGE_BUILDDIR}/.tested" -nt "${WORKDIR}" ];
15 then
16
17 or
18
19 ebuild.sh:1090: cd "${WORKDIR}"
20
21 (The line that looks like an oversight is:
22
23 ebuild.sh:1019: if [[ ${PORTAGE_BUILDDIR}/.compiled -nt ${WORKDIR} ]] ;
24 then
25 )
26
27 > [gentop][scel@~] > cat test.sh
28 > #!/bin/bash
29 > TEXT="A B"
30 > Q=${TEXT}
31 > echo ${TEXT}
32 > FAIL=DONT TRYTHISATHOME
33 > [gentop][scel@~] > ./test.sh
34 > A B
35 > ./test.sh: line 5: TRYTHISATHOME: command not found
36
37 --
38 Ferris McCormick (P44646, MI) <fmccor@g.o>
39 Developer, Gentoo Linux (Devrel, Sparc)

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] New eclass: emul-linux-x86.eclass Torsten Rehn <scel@××××.org>
[gentoo-dev] Re: New eclass: emul-linux-x86.eclass Ryan Hill <dirtyepic@g.o>