Gentoo Archives: gentoo-dev

From: Peter Volkov <pva@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: How to pass list of paths to eclass?
Date: Thu, 13 Dec 2007 11:39:01
Message-Id: 1197545640.31633.13.camel@camobap
In Reply to: [gentoo-dev] Re: How to pass list of paths to eclass? by Steve Long
1 В Чтв, 13/12/2007 в 10:52 +0000, Steve Long пишет:
2 > Peter Volkov wrote:
3 > > Speaking about the
4 > > latter it is:
5 > >
6 > > 1. Modify eclass to use arrays:
7 > >
8 > > for conffile in ${FONT_CONF[@]}; do
9 > > ...
10 > > done
11 > >
12 > > 2. Modify ebuilds to use arrays.
13 > >
14 > > -FONT_CONF="path1 path2"
15 > > +FONT_CONF=( "path1" "path2" )
16 > >
17 > > 3. Modify eclass, so that it works with path containing spaces inside:
18 > >
19 > > -for conffile in ${FONT_CONF[@]}; do
20 > > +for conffile in "${FONT_CONF[@]}"; do
21
22 > That looks right, although step 1 should *always* be to use the code from
23 > step 3.
24
25 No. The idea is to have after first step some kind of "backward
26 compatibility". So while we have
27
28 FONT_CONF="path1 path2"
29
30 definitions in the tree, when I use them as array bash will expand
31 ${FONT_CONF[@]} in the same way as array with exactly 1 element. And I
32 do not it to be qouted as for cycle should iterate through path{1,2}. I
33 know this does not work with spaces, but current implementations has the
34 same limitation.
35
36 --
37 Peter.

Attachments

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

Replies

Subject Author
[gentoo-dev] Re: Re: How to pass list of paths to eclass? Steve Long <slong@××××××××××××××××××.uk>