1 |
Thomas Cort wrote: |
2 |
> What is the proper quoting style for using epatch? In the tree there |
3 |
> are about 3 different styles... |
4 |
> |
5 |
> epatch ${FILESDIR}/some-fix.patch # used by 7326 ebuilds |
6 |
> epatch "${FILESDIR}"/some-fix.patch # used by 3092 ebuilds |
7 |
> epatch "${FILESDIR}/some-fix.patch" # used by 1434 ebuilds |
8 |
> |
9 |
> What is the proper quoting style for defining the S variable? In the |
10 |
> tree there are about 3 different styles... |
11 |
> |
12 |
> S=${WORKDIR}/${MY_P} # used by 5270 ebuilds |
13 |
> S="${WORKDIR}"/${MY_P} # used by 43 ebuilds |
14 |
> S="${WORKDIR}/${MY_P}" # used by 2259 ebuilds |
15 |
|
16 |
The reasoning for quoting here is at least twofold: |
17 |
|
18 |
1) There may be spaces in paths (e.g. PORTDIR and PORTAGE_TMPDIR), so |
19 |
you need to use quotes. |
20 |
2) When you set a variable to a string, you should use quotes. |
21 |
|
22 |
Older ebuilds probably mostly lack quoting around uses of $FILESDIR, $S |
23 |
and $D in the ebuild. |
24 |
|
25 |
Thanks, |
26 |
Donnie |