mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
fix(build_image_util.sh): Move image install mask to portage profile.
Reduce the spaghetti config a bit...
This commit is contained in:
parent
37267cfce4
commit
175d88e6e4
@ -143,7 +143,7 @@ create_base_image() {
|
|||||||
|
|
||||||
# First thing first, install baselayout with USE=build to create a
|
# First thing first, install baselayout with USE=build to create a
|
||||||
# working directory tree. Don't use binpkgs due to the use flag change.
|
# working directory tree. Don't use binpkgs due to the use flag change.
|
||||||
sudo -E USE=build ${EMERGE_BOARD_CMD} --root="${root_fs_dir}" \
|
sudo -E USE=build "emerge-${BOARD}" --root="${root_fs_dir}" \
|
||||||
--usepkg=n --buildpkg=n --oneshot --quiet --nodeps sys-apps/baselayout
|
--usepkg=n --buildpkg=n --oneshot --quiet --nodeps sys-apps/baselayout
|
||||||
|
|
||||||
# We need to install libc manually from the cross toolchain.
|
# We need to install libc manually from the cross toolchain.
|
||||||
|
@ -20,15 +20,6 @@ BUILD_DIR="${FLAGS_output_root}/${BOARD}/${IMAGE_SUBDIR}"
|
|||||||
OUTSIDE_OUTPUT_DIR="../build/images/${BOARD}/${IMAGE_SUBDIR}"
|
OUTSIDE_OUTPUT_DIR="../build/images/${BOARD}/${IMAGE_SUBDIR}"
|
||||||
IMAGES_TO_BUILD=
|
IMAGES_TO_BUILD=
|
||||||
|
|
||||||
EMERGE_BOARD_CMD="$GCLIENT_ROOT/chromite/bin/parallel_emerge"
|
|
||||||
EMERGE_BOARD_CMD="$EMERGE_BOARD_CMD --board=$BOARD"
|
|
||||||
|
|
||||||
export INSTALL_MASK="${DEFAULT_INSTALL_MASK}"
|
|
||||||
|
|
||||||
if [[ $FLAGS_jobs -ne -1 ]]; then
|
|
||||||
EMERGE_JOBS="--jobs=$FLAGS_jobs"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Populates list of IMAGES_TO_BUILD from args passed in.
|
# Populates list of IMAGES_TO_BUILD from args passed in.
|
||||||
# Arguments should be the shortnames of images we want to build.
|
# Arguments should be the shortnames of images we want to build.
|
||||||
get_images_to_build() {
|
get_images_to_build() {
|
||||||
@ -140,6 +131,14 @@ generate_au_zip () {
|
|||||||
# Arguments to this command are passed as addition options/arguments
|
# Arguments to this command are passed as addition options/arguments
|
||||||
# to the basic emerge command.
|
# to the basic emerge command.
|
||||||
emerge_to_image() {
|
emerge_to_image() {
|
||||||
sudo -E ${EMERGE_BOARD_CMD} --root-deps=rdeps --usepkgonly -v \
|
local mask="${INSTALL_MASK:-$(portageq-$BOARD envvar PROD_INSTALL_MASK)}"
|
||||||
"$@" ${EMERGE_JOBS}
|
test -n "$mask" || die "PROD_INSTALL_MASK not defined"
|
||||||
|
local emerge_cmd="$GCLIENT_ROOT/chromite/bin/parallel_emerge"
|
||||||
|
emerge_cmd+=" --board=$BOARD --root-deps=rdeps --usepkgonly -v"
|
||||||
|
|
||||||
|
if [[ $FLAGS_jobs -ne -1 ]]; then
|
||||||
|
emerge_cmd+=" --jobs=$FLAGS_jobs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo -E INSTALL_MASK="$mask" ${emerge_cmd} "$@"
|
||||||
}
|
}
|
||||||
|
43
common.sh
43
common.sh
@ -413,49 +413,6 @@ COREOS_DEVELOPER_IMAGE_NAME=${CHROMEOS_DEVELOPER_IMAGE_NAME}
|
|||||||
COREOS_PRODUCTION_IMAGE_NAME="coreos_production_image.bin"
|
COREOS_PRODUCTION_IMAGE_NAME="coreos_production_image.bin"
|
||||||
COREOS_RECOVERY_IMAGE_NAME=${CHROMEOS_RECOVERY_IMAGE_NAME}
|
COREOS_RECOVERY_IMAGE_NAME=${CHROMEOS_RECOVERY_IMAGE_NAME}
|
||||||
|
|
||||||
# Install make for portage ebuilds. Used by build_image and gmergefs.
|
|
||||||
# TODO: Is /usr/local/autotest-chrome still used by anyone?
|
|
||||||
COMMON_INSTALL_MASK="
|
|
||||||
*.a
|
|
||||||
*.la
|
|
||||||
*.h
|
|
||||||
*.hpp
|
|
||||||
/etc/init.d
|
|
||||||
/etc/runlevels
|
|
||||||
/firmware
|
|
||||||
/lib/rc
|
|
||||||
/usr/bin/Xnest
|
|
||||||
/usr/bin/Xvfb
|
|
||||||
/usr/lib/debug
|
|
||||||
/usr/lib/gcc
|
|
||||||
/usr/lib*/pkgconfig
|
|
||||||
/usr/lib/systemd/system/local-fs.target.wants
|
|
||||||
/usr/local/autotest-chrome
|
|
||||||
/usr/man
|
|
||||||
/usr/share/aclocal
|
|
||||||
/usr/share/doc
|
|
||||||
/usr/share/gettext
|
|
||||||
/usr/share/gtk-2.0
|
|
||||||
/usr/share/gtk-doc
|
|
||||||
/usr/share/info
|
|
||||||
/usr/share/man
|
|
||||||
/usr/share/openrc
|
|
||||||
/usr/share/pkgconfig
|
|
||||||
/usr/share/profiling
|
|
||||||
/usr/share/readline
|
|
||||||
/usr/src
|
|
||||||
"
|
|
||||||
|
|
||||||
# Mask for base, dev, and test images (build_image, build_image --test)
|
|
||||||
DEFAULT_INSTALL_MASK="
|
|
||||||
${COMMON_INSTALL_MASK}
|
|
||||||
/usr/local/autotest
|
|
||||||
/lib/modules/*/kernel/drivers/input/misc/uinput.ko
|
|
||||||
/lib/modules/*/build
|
|
||||||
/lib/modules/*/source
|
|
||||||
test_*.ko
|
|
||||||
"
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user