mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 15:11:19 +02:00
Add ability to blacklist packages from chromeos-base/chromeos.
Change-Id: I05370137dbe9f9adc7b18f2ff77d1b7680275c37 BUG=7973 TEST=Ran with/without current blacklist file. Also, added chromeos-base/chromeos-chrome to test it actually dies correctly. Review URL: http://codereview.chromium.org/4005002
This commit is contained in:
parent
4f7f855728
commit
e38f90f309
19
build_image
19
build_image
@ -97,6 +97,25 @@ if [ -z "${FLAGS_board}" ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
check_blacklist() {
|
||||||
|
info "Verifying that the base image does not contain a blacklisted package."
|
||||||
|
info "Generating list of packages for chromeos-base/chromeos."
|
||||||
|
local package_blacklist_file="${SCRIPTS_DIR}/chromeos_blacklist"
|
||||||
|
if [ ! -e "${package_blacklist_file}" ]; then
|
||||||
|
warn "Missing blacklist file."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
local blacklisted_packages=$(${SCRIPTS_DIR}/get_package_list \
|
||||||
|
--board="${FLAGS_board}" chromeos-base/chromeos \
|
||||||
|
| grep -x -f "${package_blacklist_file}")
|
||||||
|
if [ -n "${blacklisted_packages}" ]; then
|
||||||
|
die "Blacklisted packages found: ${blacklisted_packages}."
|
||||||
|
fi
|
||||||
|
info "No blacklisted packages found."
|
||||||
|
}
|
||||||
|
|
||||||
|
check_blacklist
|
||||||
|
|
||||||
# Verify user didn't specify incompatible flags for dev install shim
|
# Verify user didn't specify incompatible flags for dev install shim
|
||||||
if [ "${FLAGS_factory_install}" -eq "${FLAGS_TRUE}" ] &&
|
if [ "${FLAGS_factory_install}" -eq "${FLAGS_TRUE}" ] &&
|
||||||
[ "${FLAGS_dev_install}" -eq "${FLAGS_TRUE}" ] ; then
|
[ "${FLAGS_dev_install}" -eq "${FLAGS_TRUE}" ] ; then
|
||||||
|
3
chromeos_blacklist
Normal file
3
chromeos_blacklist
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
dev-lang/python
|
||||||
|
dev-java/icedtea
|
||||||
|
dev-java/icedtea6-bin
|
@ -20,11 +20,13 @@ DEFINE_string board "$DEFAULT_BOARD" \
|
|||||||
|
|
||||||
# Parse flags.
|
# Parse flags.
|
||||||
FLAGS "$@" || exit 1
|
FLAGS "$@" || exit 1
|
||||||
|
eval set -- "${FLAGS_ARGV}"
|
||||||
|
|
||||||
|
[[ -z "${FLAGS_board}" ]] && die "A board must be specified."
|
||||||
|
|
||||||
if [[ -z "${FLAGS_ARGV}" ]]; then
|
if [[ -z "${FLAGS_ARGV}" ]]; then
|
||||||
echo "Please specify package."
|
warn "Please specify package."
|
||||||
echo "Usage: ./get_package_list.sh chromeos-base/chromeos > package.list"
|
die "Usage: ./get_package_list.sh chromeos-base/chromeos > package.list"
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
emerge-$FLAGS_board --emptytree --usepkgonly -p -v --columns \
|
emerge-$FLAGS_board --emptytree --usepkgonly -p -v --columns \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user