[pacman-dev] Comments with `)' are either broken or disallowed

Michael Witten mfwitten at gmail.com
Wed May 14 10:49:19 EDT 2014


On Wed, 14 May 2014 20:09:15 +1000, Allan McRae wrote:

> On 12/05/14 12:47, Michael Witten wrote:
>> In `makepkg' (that is, in `scripts/makepkg.sh.in'), the following exist:
>> 
>>   	local provides_list=()
>>   	eval $(awk '/^[[:space:]]*provides=/,/\)/' "$BUILDFILE" | \
>>   		sed -e "s/provides=/provides_list+=/" -e "s/#.*//" -e 's/\\$//')
>>   ...
>>   	local backup_list=()
>>   	eval $(awk '/^[[:space:]]*backup=/,/\)/' "$BUILDFILE" | \
>>   		sed -e "s/backup=/backup_list+=/" -e "s/#.*//" -e 's/\\$//')
>>   ...
>>   	local optdepends_list=()
>>   	eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(#.*)?$/' "$BUILDFILE" | \
>>   		sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//')
>>   ...
>>   	local known kopt options_list
>>   	eval $(awk '/^[[:space:]]*options=/,/\)/' "$BUILDFILE" | \
>>   		sed -e "s/options=/options_list+=/" -e "s/#.*//" -e 's/\\$//')
>> 
>> Perhaps there are more.
>> 
>> As you can plainly see, this ruins the ability to include comments that use
>> the `)' character, as in the following:
>> 
>>   options=(
>>     '!strip'
>>     '!makeflags' # Apparently, there are issues with concurrency (`-j2', etc.)
>>   )
>> 
>
> This needs a bug in the bug tracker.
>
> Allan

https://bugs.archlinux.org/task/40361 


More information about the pacman-dev mailing list