From 0e9644c0f9f5c0d1db674850c0fbdc25f94e5661 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Fri, 30 Nov 2018 11:26:10 -0500 Subject: [PATCH] native cross: Check if build is necessary on target arch Target arch is the system the package will run on. Host arch is the system the package is compiled on. For example kernel packages can be compiled on host arch x86_64 and intended to run on target arch armhf. A build is necessary check against host arch will always return True. The correct way is to check if the package needs to be built for target arch. --- pmb/build/_package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pmb/build/_package.py b/pmb/build/_package.py index 8568813a..4ca06850 100644 --- a/pmb/build/_package.py +++ b/pmb/build/_package.py @@ -181,11 +181,11 @@ def init_buildenv(args, apkbuild, arch, strict=False, force=False, cross=None, if cross == "native": depends_arch = args.arch_native - # Build dependencies (package arch) + # Build dependencies (host arch) depends, built = build_depends(args, apkbuild, depends_arch, strict) - # Check if build is necessary - if not is_necessary_warn_depends(args, apkbuild, depends_arch, force, built): + # Check if build is necessary (target arch) + if not is_necessary_warn_depends(args, apkbuild, arch, force, built): return False # Install and configure abuild, ccache, gcc, dependencies