From 35269d23f899f058cab64c788fe3c633fd635123 Mon Sep 17 00:00:00 2001 From: David James Date: Thu, 19 May 2011 17:59:58 -0700 Subject: [PATCH] Run eclean before checking blacklist to ensure correct blacklist check. As reported in Bug 15561, build_image sometimes reports incorrect blacklist packages if it reports an error about a package that is not actually installed. For example, if you install =dev-libs/glib-2.28.6, and then replace it with =dev-libs/glib-2.26.1-r1, build_image will report a blacklist failure because glib depends on Python. But that's wrong -- it's looking at the wrong package. BUG=chromium-os:15561 TEST=Test that build_image does not report an error when the package it's complaining about is not installed anymore. Change-Id: I86b25684d0e211fd144231c7a34276ecf5607ad7 Reviewed-on: http://gerrit.chromium.org/gerrit/1227 Reviewed-by: Darin Petkov Reviewed-by: David James Tested-by: David James --- build_image | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build_image b/build_image index 17454945b5..d7ce93377b 100755 --- a/build_image +++ b/build_image @@ -117,6 +117,11 @@ if [ -z "${FLAGS_board}" ] ; then exit 1 fi +# Perform an eclean to remove packages which are not installed +if [[ ${FLAGS_eclean} -eq ${FLAGS_TRUE} ]]; then + eclean-${FLAGS_board} -d packages +fi + check_blacklist() { info "Verifying that the base image does not contain a blacklisted package." info "Generating list of packages for chromeos-base/chromeos." @@ -737,11 +742,6 @@ if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then fi fi -# Perform an eclean to remove packages which are not installed -if [[ ${FLAGS_eclean} -eq ${FLAGS_TRUE} ]]; then - eclean-${FLAGS_board} -d packages -fi - # Create the boot.desc file which stores the build-time configuration # information needed for making the image bootable after creation with # cros_make_image_bootable.