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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 EOF | 184 EOF |
185 | 185 |
186 # Install the kernel. | 186 # Install the kernel. |
187 sudo APT_CONFIG="$APT_CONFIG" apt-get --force-yes \ | 187 sudo APT_CONFIG="$APT_CONFIG" apt-get --force-yes \ |
188 install "linux-image-${KERNEL_VERSION}" | 188 install "linux-image-${KERNEL_VERSION}" |
189 | 189 |
190 # Clean up the apt cache. | 190 # Clean up the apt cache. |
191 # TODO: The cache was populated by debootstrap, not these installs. Remove | 191 # TODO: The cache was populated by debootstrap, not these installs. Remove |
192 # this line when we can get debootstrap to stop doing this. | 192 # this line when we can get debootstrap to stop doing this. |
193 sudo rm -f "${ROOT_FS_DIR}"/var/cache/apt/archives/*.deb | 193 sudo rm -f "${ROOT_FS_DIR}"/var/cache/apt/archives/*.deb |
| 194 # Need to rm read-only created lock files in order for archiving step to work |
| 195 sudo rm -rf "$APT_CACHE_DIR" |
194 | 196 |
195 # List all packages installed so far, since these are what the local | 197 # List all packages installed so far, since these are what the local |
196 # repository needs to contain. | 198 # repository needs to contain. |
197 # TODO: Replace with list_installed_packages.sh when it is fixed up. | 199 # TODO: Replace with list_installed_packages.sh when it is fixed up. |
198 dpkg --root="${ROOT_FS_DIR}" -l > \ | 200 dpkg --root="${ROOT_FS_DIR}" -l > \ |
199 "${OUTPUT_DIR}/package_list_installed.txt" | 201 "${OUTPUT_DIR}/package_list_installed.txt" |
200 | 202 |
201 cleanup_rootfs_mounts | 203 cleanup_rootfs_mounts |
202 trap - EXIT | 204 trap - EXIT |
OLD | NEW |