OLD | NEW |
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 options {"--root=${ROOT_FS_DIR}";}; | 86 options {"--root=${ROOT_FS_DIR}";}; |
87 }; | 87 }; |
88 EOF | 88 EOF |
89 | 89 |
90 # TODO: Full audit of the apt conf dump to make sure things are ok. | 90 # TODO: Full audit of the apt conf dump to make sure things are ok. |
91 apt-config -c="$APT_CONFIG" dump > "${ROOT_FS_DIR}/../apt.conf.dump" | 91 apt-config -c="$APT_CONFIG" dump > "${ROOT_FS_DIR}/../apt.conf.dump" |
92 | 92 |
93 # Install prod packages | 93 # Install prod packages |
94 COMPONENTS=`cat $FLAGS_package_list | grep -v ' *#' | grep -v '^ *$' | sed '/$/{
N;s/\n/ /;}'` | 94 COMPONENTS=`cat $FLAGS_package_list | grep -v ' *#' | grep -v '^ *$' | sed '/$/{
N;s/\n/ /;}'` |
95 sudo apt-get -c="$APT_CONFIG" update | 95 sudo apt-get -c="$APT_CONFIG" update |
96 sudo apt-get -c="$APT_CONFIG" --yes --force-yes install $COMPONENTS | 96 sudo apt-get -c="$APT_CONFIG" --yes --force-yes --no-install-recommends \ |
| 97 install $COMPONENTS |
97 | 98 |
98 # Create kernel installation configuration to suppress warnings, | 99 # Create kernel installation configuration to suppress warnings, |
99 # install the kernel in /boot, and manage symlinks. | 100 # install the kernel in /boot, and manage symlinks. |
100 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/kernel-img.conf" | 101 cat <<EOF | sudo dd of="${ROOT_FS_DIR}/etc/kernel-img.conf" |
101 link_in_boot = yes | 102 link_in_boot = yes |
102 do_symlinks = yes | 103 do_symlinks = yes |
103 minimal_swap = yes | 104 minimal_swap = yes |
104 clobber_modules = yes | 105 clobber_modules = yes |
105 warn_reboot = no | 106 warn_reboot = no |
106 do_bootloader = no | 107 do_bootloader = no |
(...skipping 14 matching lines...) Expand all Loading... |
121 # Clean up the apt cache. | 122 # Clean up the apt cache. |
122 # TODO: The cache was populated by debootstrap, not these installs. Remove | 123 # TODO: The cache was populated by debootstrap, not these installs. Remove |
123 # this line when we can get debootstrap to stop doing this. | 124 # this line when we can get debootstrap to stop doing this. |
124 sudo rm -f "${ROOT_FS_DIR}"/var/cache/apt/archives/*.deb | 125 sudo rm -f "${ROOT_FS_DIR}"/var/cache/apt/archives/*.deb |
125 | 126 |
126 # List all packages installed so far, since these are what the local | 127 # List all packages installed so far, since these are what the local |
127 # repository needs to contain. | 128 # repository needs to contain. |
128 # TODO: Replace with list_installed_packages.sh when it is fixed up. | 129 # TODO: Replace with list_installed_packages.sh when it is fixed up. |
129 dpkg --root="${ROOT_FS_DIR}" -l > \ | 130 dpkg --root="${ROOT_FS_DIR}" -l > \ |
130 "${FLAGS_output_dir}/package_list_installed.txt" | 131 "${FLAGS_output_dir}/package_list_installed.txt" |
OLD | NEW |