scripts/deplist: support conditional logic
Some packages rely on conditional logic to update global variables, such as depends
, options
, etc.
For example:
$ grep -rv ^options= system | grep APKBUILD | grep \\soptions= | sort
system/binutils/APKBUILD: options="!check"
system/gcc/APKBUILD:m68k) options="$options textrels" ;;
system/gcc/APKBUILD:ppc) options="$options textrels" ;;
system/lz4/APKBUILD:armhf) options="!check" ;; # FIXME
system/musl/APKBUILD: options="$options !dbg"
$ grep -rv ^options= user | grep APKBUILD | grep \\soptions= | sort
user/dovecot/APKBUILD: # Remove libtool archives. abuild doesn't remove them automatically even without options=libtool.
user/libatomic_ops/APKBUILD:s390x) options="!check" ;; # FIXME
user/llvm14/APKBUILD: arm*) options="$options !check";;
user/qemu/APKBUILD: options=""
user/qemu/APKBUILD: options=""
user/qemu/APKBUILD: options=""
user/snappy/APKBUILD:[ "$CARCH" = "armhf" ] && options="!check" # does not pass testsuite on armhf
user/valgrind/APKBUILD: # we have options=!strip above so we strip the /usr/bin/* manually
user/wine/APKBUILD:pmmx|x86) options="$options textrels"
user/z3/APKBUILD:pmmx) options="$options textrels";;
If we are going to build packages in a provably-correct manner, we need to ensure that dependency order is correct. This is not strictly an issue for clean builds (e.g. autobuilder from scratch) but will become an issue when we need to rebuild a subset of packages in the case of updates to the packages repository.
Work involves surveying existing packages to see if there are any conditions that do not depend on target architecture, to determine scope of what knobs we have to play with. This will likely involve implementing subpackage-granularity support, which may require a new (optimized) tool to avoid blowing up computational time of the already-slow scripts.