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

Side by Side Diff: src/scripts/install_packages.sh

Issue 545130: ARM build: replacement postinst for netbase (Closed)
Patch Set: rewrite to do less work Created 10 years, 11 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
« no previous file with comments | « src/package_scripts/package.whitelist ('k') | no next file » | 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 install packages into the target root file system. 7 # Script to install packages into the target root file system.
8 # 8 #
9 # NOTE: This script should be called by build_image.sh. Do not run this 9 # NOTE: This script should be called by build_image.sh. Do not run this
10 # on your own unless you know what you are doing. 10 # on your own unless you know what you are doing.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 sudo cp -a /etc/resolv.conf "${ROOT_FS_DIR}/etc/resolv.conf" 204 sudo cp -a /etc/resolv.conf "${ROOT_FS_DIR}/etc/resolv.conf"
205 sudo ln -sf /bin/true "${ROOT_FS_DIR}/usr/sbin/invoke-rc.d" 205 sudo ln -sf /bin/true "${ROOT_FS_DIR}/usr/sbin/invoke-rc.d"
206 sudo ln -sf /bin/true "${ROOT_FS_DIR}/usr/sbin/update-rc.d" 206 sudo ln -sf /bin/true "${ROOT_FS_DIR}/usr/sbin/update-rc.d"
207 207
208 # Set up mounts for working within the rootfs. We copy some basic 208 # Set up mounts for working within the rootfs. We copy some basic
209 # network information from the host so that maintainer scripts can 209 # network information from the host so that maintainer scripts can
210 # access the network as needed. 210 # access the network as needed.
211 # TODO: All of this rootfs mount stuff can be removed as soon as we stop 211 # TODO: All of this rootfs mount stuff can be removed as soon as we stop
212 # running the maintainer scripts on install. 212 # running the maintainer scripts on install.
213 sudo mount -t proc proc "${ROOT_FS_DIR}/proc" 213 sudo mount -t proc proc "${ROOT_FS_DIR}/proc"
214 sudo cp /etc/hosts "${ROOT_FS_DIR}/etc"
215 trap cleanup_rootfs_mounts EXIT 214 trap cleanup_rootfs_mounts EXIT
216 215
217 # Install prod packages 216 # Install prod packages
218 COMPONENTS=`cat $FLAGS_package_list | sed -e 's/#.*//' | grep -v '^ *$' | sed '/ $/{N;s/\n/ /;}'` 217 COMPONENTS=`cat $FLAGS_package_list | sed -e 's/#.*//' | grep -v '^ *$' | sed '/ $/{N;s/\n/ /;}'`
219 sudo APT_CONFIG="$APT_CONFIG" DEBIAN_FRONTEND=noninteractive \ 218 sudo APT_CONFIG="$APT_CONFIG" DEBIAN_FRONTEND=noninteractive \
220 apt-get --force-yes install $COMPONENTS 219 apt-get --force-yes install $COMPONENTS
221 220
222 # Create kernel installation configuration to suppress warnings, 221 # Create kernel installation configuration to suppress warnings,
223 # install the kernel in /boot, and manage symlinks. 222 # install the kernel in /boot, and manage symlinks.
224 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/kernel-img.conf" 223 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/kernel-img.conf"
(...skipping 12 matching lines...) Expand all
237 apt-get --force-yes install "linux-image-${KERNEL_VERSION}" 236 apt-get --force-yes install "linux-image-${KERNEL_VERSION}"
238 237
239 # List all packages installed so far, since these are what the local 238 # List all packages installed so far, since these are what the local
240 # repository needs to contain. 239 # repository needs to contain.
241 # TODO: Replace with list_installed_packages.sh when it is fixed up. 240 # TODO: Replace with list_installed_packages.sh when it is fixed up.
242 dpkg --root="${ROOT_FS_DIR}" -l > \ 241 dpkg --root="${ROOT_FS_DIR}" -l > \
243 "${OUTPUT_DIR}/package_list_installed.txt" 242 "${OUTPUT_DIR}/package_list_installed.txt"
244 243
245 cleanup_rootfs_mounts 244 cleanup_rootfs_mounts
246 trap - EXIT 245 trap - EXIT
OLDNEW
« no previous file with comments | « src/package_scripts/package.whitelist ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698