-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 01/09/14 08:02 AM, Michał Górny wrote:
> Dnia 2014-08-31, o godz. 14:14:20 Pacho Ramos <[email protected]>
> napisał(a):
> 
>> This tries to solve: 
>> https://bugs.gentoo.org/show_bug.cgi?id=519682
>> 
>> Looks to do the job but maybe there are shorter or saner ways of
>> doing it
> 
> There are no sane ways of doing this. For a sane alternative, take 
> a look at python_gen_any_dep().
> 
> Long story short, define a list of allowed variables and do:
> 
> x=${x//\${PF}/${PF}} x=${x//\${PN}/${PN}}
> 
> etc.
> 

...we could do that, couldn't we?  If the list of variables expanded
is limited to a standard expected list (ie all one sees in 'man 5
ebuild' plus say, MY_{P,PN,PV} as those are also fairly common.

I've never compared the efficiency of bash substitution compared to
say, pipe'ing through awk or sed, though, so i don't know if this
method would be better or worse..


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREIAAYFAlQF9q4ACgkQ2ugaI38ACPDSegEArBPDRoWSjbHEp0Khu746+cFO
6JMYviZX2bchXrTNprgBALaY42zlej0hwEjGcRyUs96oDINJxu3ZKArWbPDLIWYh
=6vGm
-----END PGP SIGNATURE-----

Reply via email to