From 3dfa8527434b1d90a78da2d78dd4269c01afcbd6 Mon Sep 17 00:00:00 2001 From: Mandeep Singh Baines Date: Thu, 24 Jun 2010 15:00:49 -0700 Subject: [PATCH] build_image: use --usepkg instead of --usepkgonly We want build_image to honour the configuration in PORTDIR and only use the latest stable version as known by portage and the overlays. We get these semantics with --usepkg. We do not get them with --usepkgonly. The one downside is that instead of failing when you forget to run build_packages before build_image, build_image will try to build packages from source. From "man emerge": --usepkg[=n] (-k) Tells emerge to use binary packages (from $PKGDIR) if they are available, thus possibly avoiding some time-consuming compiles. This option is useful for CD installs; you can export PKGDIR=/mnt/cdrom/packages and then use this option to have emerge "pull" binary packages from the CD in order to satisfy dependencies. --usepkgonly[=n] (-K) Tells emerge to only use binary packages (from $PKGDIR). All the binary packages must be available at the time of dependency calculation or emerge will simply abort. Portage does not use $PORTDIR when calculating dependency information so all masking information is ignored. Change-Id: I267dad8992ac683d0ff4db0d0c72baba61ecbccf Review URL: http://codereview.chromium.org/2874013 --- build_image | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_image b/build_image index 885b068d2b..545dd65727 100755 --- a/build_image +++ b/build_image @@ -250,7 +250,7 @@ update_dev_packages() { # Install developer packages described in chromeos-dev. sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \ --root="${root_dev_dir}" --root-deps=rdeps \ - --usepkgonly chromeos-dev ${EMERGE_JOBS} + --usepkg chromeos-dev ${EMERGE_JOBS} # Re-run ldconfig to fix /etc/ldconfig.so.cache. sudo /sbin/ldconfig -r "${ROOT_FS_DIR}" @@ -298,7 +298,7 @@ update_recovery_packages() { -s "${STATEFUL_FS_DIR}" # Install recovery installer. - sudo ${EMERGE_BOARD_CMD} --root=${ROOT_FS_DIR} --usepkgonly \ + sudo ${EMERGE_BOARD_CMD} --root=${ROOT_FS_DIR} --usepkg \ --root-deps=rdeps --nodeps chromeos-recovery # Re-run ldconfig to fix /etc/ldconfig.so.cache. @@ -418,13 +418,13 @@ EOF sudo mount --bind "${STATEFUL_FS_DIR}/var" "${ROOT_FS_DIR}/var" sudo mkdir -p "${ROOT_FS_DIR}/dev" - # We "emerge --root=${ROOT_FS_DIR} --root-deps=rdeps --usepkgonly" all of the + # We "emerge --root=${ROOT_FS_DIR} --root-deps=rdeps --usepkg" all of the # runtime packages for chrome os. This builds up a chrome os image from # binary packages with runtime dependencies only. We use INSTALL_MASK to # trim the image size as much as possible. sudo INSTALL_MASK="${INSTALL_MASK}" ${EMERGE_BOARD_CMD} \ --root="${ROOT_FS_DIR}" --root-deps=rdeps \ - --usepkgonly chromeos ${EMERGE_JOBS} + --usepkg chromeos ${EMERGE_JOBS} # Create EFI System Partition to boot stock EFI BIOS (but not ChromeOS EFI # BIOS). We only need this for x86, but it's simpler and safer to keep the