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 <petkov@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
This commit is contained in:
David James 2011-05-19 17:59:58 -07:00
parent 6224cba9c7
commit 35269d23f8

View File

@ -117,6 +117,11 @@ if [ -z "${FLAGS_board}" ] ; then
exit 1 exit 1
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
check_blacklist() { check_blacklist() {
info "Verifying that the base image does not contain a blacklisted package." info "Verifying that the base image does not contain a blacklisted package."
info "Generating list of packages for chromeos-base/chromeos." info "Generating list of packages for chromeos-base/chromeos."
@ -737,11 +742,6 @@ if [[ $FLAGS_preserve -eq ${FLAGS_TRUE} ]] ; then
fi fi
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 # Create the boot.desc file which stores the build-time configuration
# information needed for making the image bootable after creation with # information needed for making the image bootable after creation with
# cros_make_image_bootable. # cros_make_image_bootable.