Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: src/scripts/build_image.sh

Issue 414051: Split out installation of packages from customize_rootfs into a separate script. (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/scripts/customize_rootfs.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/build_image.sh
diff --git a/src/scripts/build_image.sh b/src/scripts/build_image.sh
index fe3876cbd2123411d013b765cf535345b25dd2cc..591916ed6c2c49bd44a4daf430ab86901ef4ee00 100755
--- a/src/scripts/build_image.sh
+++ b/src/scripts/build_image.sh
@@ -66,6 +66,7 @@ ROOT_FS_IMG="${OUTPUT_DIR}/rootfs.image"
MBR_IMG="${OUTPUT_DIR}/mbr.image"
OUTPUT_IMG="${OUTPUT_DIR}/usb.img"
+ROOTFS_PACKAGE_INSTALL_SCRIPT="install_packages.sh"
ROOTFS_CUSTOMIZE_SCRIPT="customize_rootfs.sh"
ROOTFS_SETUP_DIR="/tmp/chromeos_setup"
SETUP_DIR="${ROOT_FS_DIR}/${ROOTFS_SETUP_DIR}"
@@ -179,6 +180,7 @@ sudo mount --bind "$GCLIENT_ROOT" "$ROOT_FS_DIR/trunk"
# built packages.
mkdir -p "$SETUP_DIR"
mkdir -p "${SETUP_DIR}/local_packages"
+cp "${SCRIPTS_DIR}/${ROOTFS_PACKAGE_INSTALL_SCRIPT}" "$SETUP_DIR"
cp "${SCRIPTS_DIR}/${ROOTFS_CUSTOMIZE_SCRIPT}" "$SETUP_DIR"
cp "$FLAGS_pkglist" "${SETUP_DIR}/package-list-prod.txt"
cp "${FLAGS_build_root}/x86/local_packages"/* "${SETUP_DIR}/local_packages"
@@ -212,9 +214,16 @@ EOF
# ...and all CHROMEOS_ vars
set | grep "^CHROMEOS_" >> $CUST_OPTS
-# Run the setup script
+# Run the package install script
+sudo chroot "$ROOT_FS_DIR" \
+ "${ROOTFS_SETUP_DIR}/${ROOTFS_PACKAGE_INSTALL_SCRIPT}"
+
+# Run the script to customize the resulting root file system.
sudo chroot "$ROOT_FS_DIR" "${ROOTFS_SETUP_DIR}/${ROOTFS_CUSTOMIZE_SCRIPT}"
+# No longer need the setup directory in the rootfs.
+rm -rf "$SETUP_DIR"
+
# Move package lists from the image into the output dir
sudo mv "$ROOT_FS_DIR"/etc/package_list_*.txt "$OUTPUT_DIR"
« no previous file with comments | « no previous file | src/scripts/customize_rootfs.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698