packages: make _mode in PKGBUILD optional for building (but not for cmd_check), warn if missing

This commit is contained in:
InsanePrawn 2022-11-03 15:21:44 +01:00
parent 46f1e91f88
commit ec323ce8d7
2 changed files with 7 additions and 1 deletions

View file

@ -484,6 +484,8 @@ def build_package(
extra_packages=['base-devel'] + CROSSDIRECT_PKGS,
clean_chroot=clean_chroot,
)
if not package.mode:
logging.warning('Package {package.path} has no _mode set, assuming "host"')
cross = foreign_arch and package.mode == 'cross' and enable_crosscompile
if cross: