From 691c588c756f9333fb82bc7c5aa48ce092e22de9 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Thu, 27 Mar 2014 22:37:28 -0700 Subject: [PATCH] fix(build_packages): Simplify emerge command, use board-packages ebuild. The extra "dependency check" doesn't appear to be all that useful, so don't waste time on it. Remove some unused command line options for selecting which packages to build. Use new board-packages ebuild which currently just includes 'coreos' and 'coreos-dev' but later can include extra things like 'python-oem' which doesn't land in the base image. --- build_packages | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/build_packages b/build_packages index 0f408aedb8..a46177677a 100755 --- a/build_packages +++ b/build_packages @@ -63,12 +63,6 @@ DEFINE_boolean skip_chroot_upgrade "${FLAGS_FALSE}" \ "Don't run the chroot upgrade automatically; use with care." DEFINE_boolean skip_toolchain_update "${FLAGS_FALSE}" \ "Don't update toolchain automatically." -DEFINE_boolean withdev "${FLAGS_TRUE}" \ - "Build useful developer friendly utilities." -DEFINE_boolean withdebug "${FLAGS_TRUE}" \ - "Build debug versions of Chromium-OS-specific packages." -DEFINE_boolean withtest "${FLAGS_TRUE}" \ - "Build packages required for testing." # The --reuse_pkgs_from_local_boards flag tells Portage to share binary # packages between boards that are built locally, so that the total time @@ -186,28 +180,6 @@ if [[ "${FLAGS_showoutput}" -eq "${FLAGS_TRUE}" && \ EMERGE_FLAGS+=( --show-output ) fi -if [[ "${FLAGS_withdebug}" -eq "${FLAGS_FALSE}" ]]; then - export USE="${USE} -cros-debug" -fi - -# Figure out which packages we should be building. -PACKAGES=( "$@" ) -if [[ $# -eq 0 ]]; then - PACKAGES=( coreos-base/coreos ) - if [[ "${FLAGS_withdev}" -eq "${FLAGS_TRUE}" ]]; then - PACKAGES+=( coreos-base/coreos-dev ) - fi -fi - -# Verify that all packages can be emerged from scratch, without any -# backtracking. Only print the output if this step fails. -info "Checking package dependencies are correct: ${PACKAGES[*]}" -if ! OUTPUT=$(emerge-${FLAGS_board} -pe --backtrack=0 \ - "${PACKAGES[@]}" 2>&1); then - printf "%s\n" "${OUTPUT}" - die_notrace "emerge detected broken ebuilds. See error message above." -fi - # Build cros_workon packages when they are changed. CROS_WORKON_PKGS=() if [ "${FLAGS_noworkon}" -eq "${FLAGS_FALSE}" ]; then @@ -223,7 +195,7 @@ if [[ ${#CROS_WORKON_PKGS[@]} -gt 0 ]]; then fi info "Merging board packages now" -sudo -E "${EMERGE_CMD[@]}" "${EMERGE_FLAGS[@]}" "${PACKAGES[@]}" +sudo -E "${EMERGE_CMD[@]}" "${EMERGE_FLAGS[@]}" coreos-devel/board-packages info "Checking build root" test_image_content "${BOARD_ROOT}"