[pacman-dev] makepkg: unsetting variables

Alexander Baldeck kth5 at archlinuxppc.org
Wed Dec 6 09:11:34 EST 2006


Gabriel C wrote:
> Alexander Baldeck schrieb:
>> Hey again,
>>
>> sorry for being such a nagger today.
>>
>> Then again, I have a problem with this change - see attachment - to makepkg.
>>
>> Imagine you want to build glibc from Archlinux ABS. I have two cases for 
>> you in which it starts messing things up:
>>
>> 1) comparisons in if-clauses make makepkg freak out
>>
>> The following example:
>>
>> if [ "${CARCH}" = "i686" ]; then
>>      # Hack to fix NPTL issues with Xen, only required on 32bit platforms
>>      export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
>> fi
>>
>>
>> causes:
>>
>> /usr/bin/makepkg: line 415: unset: `[': not a valid identifier
>> /usr/bin/makepkg: line 415: unset: `"${CARCH}"': not a valid identifier
>> /usr/bin/makepkg: line 415: unset: `=': not a valid identifier
>> /usr/bin/makepkg: line 415: unset: `"i686"': not a valid identifier
>>
>>
>> 2) appending strings in bash-style does not work anymore
>>
>> After getting rid of the if-clauses in the PKGBUILD for the sake of 
>> testing, a line like this:
>>
>> $ CFLAGS="-O2"
>> $ export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
>>
>> will result in:
>>
>> $ echo $CFLAGS
>> $ -mno-tls-direct-seg-refs
>>   
> 
> fix your box ?
> 

Obviously, this was an visualized example taken from a PKGBUILD not a 
shell. Thanks anyways, but let me assure you that I know that my box 
works cos I maintain it from the ground up.

-P




More information about the pacman-dev mailing list