Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: build_image

Issue 4005002: Add ability to blacklist packages from chromeos-base/chromeos. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Remove extra lines. Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chromeos_blacklist » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Script to build a bootable keyfob-based chromeos system image from within 7 # Script to build a bootable keyfob-based chromeos system image from within
8 # a chromiumos setup. This assumes that all needed packages have been built into 8 # a chromiumos setup. This assumes that all needed packages have been built into
9 # the given target's root with binary packages turned on. This script will 9 # the given target's root with binary packages turned on. This script will
10 # build the Chrome OS image using only pre-built binary packages. 10 # build the Chrome OS image using only pre-built binary packages.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 # Only now can we die on error. shflags functions leak non-zero error codes, 91 # Only now can we die on error. shflags functions leak non-zero error codes,
92 # so will die prematurely if 'set -e' is specified before now. 92 # so will die prematurely if 'set -e' is specified before now.
93 set -e 93 set -e
94 94
95 if [ -z "${FLAGS_board}" ] ; then 95 if [ -z "${FLAGS_board}" ] ; then
96 error "--board is required." 96 error "--board is required."
97 exit 1 97 exit 1
98 fi 98 fi
99 99
100 check_blacklist() {
101 info "Verifying that the base image does not contain a blacklisted package."
102 info "Generating list of packages for chromeos-base/chromeos."
103 local package_blacklist_file="${SCRIPTS_DIR}/chromeos_blacklist"
104 if [ ! -e "${package_blacklist_file}" ]; then
105 warn "Missing blacklist file."
106 return
107 fi
108 local blacklisted_packages=$(${SCRIPTS_DIR}/get_package_list \
109 --board="${FLAGS_board}" chromeos-base/chromeos \
110 | grep -x -f "${package_blacklist_file}")
111 if [ -n "${blacklisted_packages}" ]; then
112 die "Blacklisted packages found: ${blacklisted_packages}."
113 fi
114 info "No blacklisted packages found."
115 }
116
117 check_blacklist
118
100 # Verify user didn't specify incompatible flags for dev install shim 119 # Verify user didn't specify incompatible flags for dev install shim
101 if [ "${FLAGS_factory_install}" -eq "${FLAGS_TRUE}" ] && 120 if [ "${FLAGS_factory_install}" -eq "${FLAGS_TRUE}" ] &&
102 [ "${FLAGS_dev_install}" -eq "${FLAGS_TRUE}" ] ; then 121 [ "${FLAGS_dev_install}" -eq "${FLAGS_TRUE}" ] ; then
103 die "Incompatible flags: --factory_install and --dev_install cannot be \ 122 die "Incompatible flags: --factory_install and --dev_install cannot be \
104 both set to True. Please specify one or none." 123 both set to True. Please specify one or none."
105 fi 124 fi
106 125
107 INSTALL_MASK="" 126 INSTALL_MASK=""
108 if [ "${FLAGS_installmask}" -eq "${FLAGS_TRUE}" ] ; then 127 if [ "${FLAGS_installmask}" -eq "${FLAGS_TRUE}" ] ; then
109 INSTALL_MASK="${DEFAULT_INSTALL_MASK}" 128 INSTALL_MASK="${DEFAULT_INSTALL_MASK}"
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" 784 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}"
766 fi 785 fi
767 786
768 print_time_elapsed 787 print_time_elapsed
769 788
770 echo "To copy to USB keyfob, do something like:" 789 echo "To copy to USB keyfob, do something like:"
771 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 790 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
772 echo "To convert to VMWare image, INSIDE the chroot, do something like:" 791 echo "To convert to VMWare image, INSIDE the chroot, do something like:"
773 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" 792 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}"
774 echo "from the scripts directory where you entered the chroot." 793 echo "from the scripts directory where you entered the chroot."
OLDNEW
« no previous file with comments | « no previous file | chromeos_blacklist » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698