Am 05.05.20 um 22:40 schrieb Eli Schwartz:
> On 5/5/20 4:11 PM, brainpower wrote:
> [...]
> 
>> This made me wonder:
>> Is this something makepkg should take care of (e.g.by restoring $HOME after 
>> build() or ensuring gpg will use $OLDHOME/.gnupg)
>> or should such a PKGBUILD be considered broken / invalid?
> 
> [...]
> 
>> $ cat PKGBUILD
>> pkgname=broken-home
>> pkgver=1
>> pkgrel=1
>> arch=('any')
>>
>> build() {
>>   export HOME="${srcdir}/tmphome"
>> }
> I would argue this should probably be a 'local' variable. e.g.
> 
> build() {
>     local HOME="${srcdir}/tmphome"
>     some-command-that-needs-fakehome
> }
> 
> Since HOME is previously marked as exportable, it is still getting
> exported, and modifying an exported variable causes the changes to be
> picked up. 

This part I actually knew!

> And the 'local' attribute coexists with the exported attribute:

But this I did not.

Thanks for your answer!

-- 
regards,
brainpower

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to