1 |
Olivier Fisette wrote: |
2 |
>>Anyway, if we going to include both, files and inlined vars, we have to |
3 |
>>have a bit complicated parser of lines. In such case we even don't need |
4 |
>>[], we can leave as |
5 |
>>=app-sci/pymol-0.95* gcc_low_opt CC="gcc" |
6 |
>>"=" specify enough that we have inlined expression. |
7 |
> |
8 |
> |
9 |
> I don't think so. What if you want to source a bash script containing |
10 |
> functions to manipulate variables, such as filtering or replacing CFLAGS? |
11 |
> There is no "=" in such a command. If inline is used, we'll need delimiters. |
12 |
> |
13 |
> However, I don't think inline definitions are that important. A first |
14 |
> implementation dealing only with "atom [env_file] [...]" in package.env would |
15 |
> be enough, certainly. |
16 |
> |
17 |
Even more, I can say that my first idea was idea with delimiters or some |
18 |
kind of brackets. But after time I've realized that it's looks a bit |
19 |
ugly and not intuitive. Moreover, I really believe that if you want to |
20 |
include something really complicated, better to do it via separate file, |
21 |
rather via inlining, by this you will decrease probability that file |
22 |
will be parsed wrong. Moreover, I also suggest that inline definitions |
23 |
not such important, more, I believe that in 99.9% cases you will want to |
24 |
inline something like VAR="foo bar". So, I think it not worst to make |
25 |
limitation about inlining, only simple variable definitions. Rest goes |
26 |
to separate files. In such case we have somehow easy and intuitive (I |
27 |
hope) syntax, which not looks ugly (at least for me :)), simple parsing |
28 |
and so on. |
29 |
But of course, implementing of "atom env_file1 env_file2 ..." is |
30 |
simplest for now, at least from my ponit of view. (I'm really not great |
31 |
specialist in python, and really didn't pass throw all portage scripts, |
32 |
but I've found that I can really implement easy this syntax for adding |
33 |
about 5-10 lines of code into portage, via using methods that already |
34 |
exist there) |
35 |
|
36 |
-- |
37 |
Anton Starikov |
38 |
|
39 |
-- |
40 |
gentoo-dev@g.o mailing list |