Support arch="" in APKBUILD to skip builds (MR 1985)

Alpine indicates with arch="", that a package should temporarily not be
built for any architecture. Support this in postmarketOS too by not
complaining in the APKBUILD parser if arch is empty.

Adjust pmb.build.autodetect.arch and pmb.build.menuconfig.get_arch, so
both don't fail with an IndexError when encountering a disabled package.

Co-Authored-By: Luca Weiss <luca@z3ntu.xyz>
This commit is contained in:
Oliver Smith 2020-10-11 14:37:41 +02:00 committed by Luca Weiss
parent 112e72b068
commit 173f90d796
No known key found for this signature in database
GPG key ID: 72D843B89D4DD756
3 changed files with 9 additions and 5 deletions

View file

@ -57,7 +57,10 @@ def arch(args, pkgname):
if arch_device in arches:
return arch_device
return apkbuild["arch"][0]
try:
return apkbuild["arch"][0]
except IndexError:
return None
def suffix(args, apkbuild, arch):