build_image_util: Don't install packages to image with bad USE flags

This generally shouldn't happen, given that we mostly only keep one
instance of a bin package, but just in case.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
James Le Cuirot 2026-04-20 10:20:54 +01:00
parent 433f8c40fd
commit 8f8977f668
No known key found for this signature in database
GPG Key ID: 1226415D00DD3137

View File

@ -152,7 +152,12 @@ emerge_to_image() {
sudo -E ROOT="${root_fs_dir}" \
FEATURES="-ebuild-locks -merge-wait" \
PORTAGE_CONFIGROOT="${BUILD_DIR}"/configroot \
emerge --usepkgonly --jobs="${NUM_JOBS}" --verbose "$@"
emerge \
--usepkgonly \
--binpkg-respect-use=y \
--jobs="${NUM_JOBS}" \
--verbose \
"$@"
# Shortcut if this was just baselayout
[[ "$*" == *sys-apps/baselayout ]] && return