[aur-dev] [PATCH] Fix: FS#13189, infinite variable replacement cycle

Gergely Imreh imrehg at gmail.com
Fri Feb 13 18:59:01 EST 2009


Now, hopefully for the last time, after some mailman changes, here we go again.

2009/2/14 Gergely Imreh <imrehg at gmail.com>:
> Yeah, except I missed attaching the patch, bummer...
>
>
> 2009/2/14 Gergely Imreh <imrehg at gmail.com>:
>> Hi,
>>
>>  Bug report FS#13189 brought to light a situation when certain lines
>> in the PKGBUILD would cause the pkgbuild.php end up in an infinite
>> cycle.
>>  Example is a line such as:
>>  foo=$foo
>>  or as in the bug report:
>>  CXXFLAGS=$CXXFLAGS' -fpic'
>>
>>  In the first case, e.g. $foo would be recognized as a call for
>> replacement for "foo", and then replaced with "$foo", then checked
>> again for values to replace.... you can guess how well it goes...
>>
>>  This patch removes this situation by setting the variable value to
>> empty (to ""), if it recognizes that there would be such a cycle. This
>> behaviour is not exactly what bash would do, since e.g. if there are
>> two lines in the PKGBUILD such as:
>>  foo=something
>>  foo=$foo
>>  then in bash in the end foo would have a proper value ("something"),
>> while in our case it would be empty. In my opinion this is not a
>> problem, since generally these kind of PKGBUILDs could be considered
>> malformed.....
>>
>>  The eval type parameter substitution is not changed at the moment,
>> since even if does not give the same value as bash, it does not cause
>> such cycle as the normal substitution.
>>
>>  Cheers,
>>        Greg
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-FS-13189-infinite-variable-replacement-cycle.patch
Type: application/octet-stream
Size: 1135 bytes
Desc: not available
URL: <http://www.archlinux.org/pipermail/aur-dev/attachments/20090214/67a39f97/attachment.obj>


More information about the aur-dev mailing list