5 Jun
2020
5 Jun
'20
7:59 a.m.
On 5/6/20 5:39 pm, Erich Eckner wrote:
Hi,
I stumbled upon the fact, that variables set in one package_...() function of a split package are accessible by following package_...() functions. Is this by design or may I try to provide a patch to restore env after the call to package_...()? Note: packaging-relevant variables (e.g. depends_x86_64) are cleaned across function calls.
Simple example:
------8<------8<------8<------ arch=(any) pkgbase=test pkgname=(ta tb) pkgver=0 pkgrel=1
package_ta() { _test='hi, there!' }
package_tb() { echo "$_test" } ------>8------>8------>8------
PKGBUILDs are bash. Bash scope rules apply. Allan