1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA256 |
3 |
|
4 |
On 01/09/14 08:02 AM, Micha³ Górny wrote: |
5 |
> Dnia 2014-08-31, o godz. 14:14:20 Pacho Ramos <pacho@g.o> |
6 |
> napisa³(a): |
7 |
> |
8 |
>> This tries to solve: |
9 |
>> https://bugs.gentoo.org/show_bug.cgi?id=519682 |
10 |
>> |
11 |
>> Looks to do the job but maybe there are shorter or saner ways of |
12 |
>> doing it |
13 |
> |
14 |
> There are no sane ways of doing this. For a sane alternative, take |
15 |
> a look at python_gen_any_dep(). |
16 |
> |
17 |
> Long story short, define a list of allowed variables and do: |
18 |
> |
19 |
> x=${x//\${PF}/${PF}} x=${x//\${PN}/${PN}} |
20 |
> |
21 |
> etc. |
22 |
> |
23 |
|
24 |
...we could do that, couldn't we? If the list of variables expanded |
25 |
is limited to a standard expected list (ie all one sees in 'man 5 |
26 |
ebuild' plus say, MY_{P,PN,PV} as those are also fairly common. |
27 |
|
28 |
I've never compared the efficiency of bash substitution compared to |
29 |
say, pipe'ing through awk or sed, though, so i don't know if this |
30 |
method would be better or worse.. |
31 |
|
32 |
|
33 |
-----BEGIN PGP SIGNATURE----- |
34 |
Version: GnuPG v2 |
35 |
|
36 |
iF4EAREIAAYFAlQF9q4ACgkQ2ugaI38ACPDSegEArBPDRoWSjbHEp0Khu746+cFO |
37 |
6JMYviZX2bchXrTNprgBALaY42zlej0hwEjGcRyUs96oDINJxu3ZKArWbPDLIWYh |
38 |
=6vGm |
39 |
-----END PGP SIGNATURE----- |