mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
Update build_image to not use -uDN for developer packages.
The main benefit of this change is that it is no longer necessary to specify
custom use flags to build_image because it just merges what you already have
installed in your buildroot. It does not second guess the packages you already
have installed and just installs them, as it should.
1. Packages in the developer image should already be up to date, so there
is no need to specify '-u' for --update or '-D' for --deep.
2. The developer image should have identical use flags to the base image,
so there is no need to specify -N for '--newuse'.
3. The --verbose flag is generally useful, so I've updated all emerges to
use them so you can see what the use flags are used for the emerges.
BUG=chromium-os:19078
TEST=Verify build_image builds same image and installs same packages
with and without change. Verified specifying USE= is not necessary
if a few dev packages were customized.
Change-Id: I4c205c961cca84ca3161b49f59cdd37a5a4ed5b1
Reviewed-on: http://gerrit.chromium.org/gerrit/5816
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
a1a06abeb7
commit
27d00f3c9e
@ -205,7 +205,7 @@ if [ ${FLAGS_factory_install} -eq ${FLAGS_TRUE} ] ; then
|
||||
fi
|
||||
|
||||
emerge_to_image() {
|
||||
sudo -E ${EMERGE_BOARD_CMD} --root-deps=rdeps --usepkgonly \
|
||||
sudo -E ${EMERGE_BOARD_CMD} --root-deps=rdeps --usepkgonly -v \
|
||||
"$@" ${EMERGE_JOBS}
|
||||
}
|
||||
|
||||
@ -363,7 +363,7 @@ EOF
|
||||
}
|
||||
|
||||
# Modifies an existing image to add development packages
|
||||
update_dev_packages() {
|
||||
install_dev_packages() {
|
||||
local image_name=$1
|
||||
|
||||
echo "Adding developer packages to ${image_name}"
|
||||
@ -380,7 +380,7 @@ update_dev_packages() {
|
||||
root_dev_dir="${ROOT_FS_DIR}/usr/local"
|
||||
|
||||
# Install developer packages described in chromeos-dev.
|
||||
emerge_to_image --root="${root_dev_dir}" -uDNv chromeos-dev
|
||||
emerge_to_image --root="${root_dev_dir}" chromeos-dev
|
||||
|
||||
# Install the bare necessary files so that the "emerge" command works
|
||||
if [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ]; then
|
||||
@ -796,7 +796,7 @@ load_kernel_test "${OUTPUT_DIR}/${PRISTINE_IMAGE_NAME}" \
|
||||
# Create a developer image based on the chromium os base image.
|
||||
if [ ${FLAGS_withdev} -eq ${FLAGS_TRUE} ] ; then
|
||||
cp ${PRISTINE_IMG} ${DEVELOPER_IMG}
|
||||
update_dev_packages ${DEVELOPER_IMAGE_NAME}
|
||||
install_dev_packages ${DEVELOPER_IMAGE_NAME}
|
||||
${SCRIPTS_DIR}/bin/cros_make_image_bootable "${OUTPUT_DIR}" \
|
||||
"${DEVELOPER_IMAGE_NAME}" \
|
||||
--force_developer_mode
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user