Skip to content

abump: fix abump environment being poluted by APKBUILD

Kevin Daudt requested to merge abump-isolate-source into master

abump sources the APKBUILD to be able to check some variables. When the APKBUILD exports variables in the global scope, that affects the abump environment as well.

When abump then executes abuild, it will inherrit the environment from abump. This is an issue under the following circumstances:

  • The APKBUILD only updates the value of an exported variable if it's not set
  • The default value includes a variable set by abuild, like $srcdir.

Because the variable is set by abuild, but not abump, the resulting exported variable is different. Because it's then set incorrectly in the abump environment, it's no longer updated with the correct variable when abuild is invoked.

Address this by sourcing the APKBUILD in a subshell.

Merge request reports

Loading