build.package: makedeps warning only for c-n2

Splitting makedepends in _host and _build only makes a difference when
building with cross-native2, as these packages end up in different
chroots.

For QEMU only and crossdirect we install all makedepends into the
foreign chroot. For cross-native (v1) we install everything into the
native chroot.

Show the warning only for cross-native2 so people don't think they have
to adjust their APKBUILDs here. Most of Alpine's APKBUILDs currently
don't have this split either.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2571
This commit is contained in:
Oliver Smith 2025-03-16 21:41:43 +01:00
parent 3dd7b5e1f3
commit 0ab75cfe2b
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -681,7 +681,7 @@ def packages(
depends_build = apkbuild["makedepends_build"] depends_build = apkbuild["makedepends_build"]
else: else:
depends_build = apkbuild["makedepends"] depends_build = apkbuild["makedepends"]
if depends_build and depends_host: if depends_build and depends_host and cross == CrossCompile.CROSS_NATIVE2:
logging.warning( logging.warning(
"WARNING: makedepends not split into _host and _build variants." "WARNING: makedepends not split into _host and _build variants."
" Trying to install all makedepends in both environments, please" " Trying to install all makedepends in both environments, please"