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

Unified Diff: src/scripts/install_packages.sh

Issue 522003: Fix issue where debconf was asking about the kernel config. (Closed)
Patch Set: Created 11 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/install_packages.sh
diff --git a/src/scripts/install_packages.sh b/src/scripts/install_packages.sh
index 028bbc3dcafae9d64656e85997c4cfabbbeb7c4f..a764d98a55c8019dc3014a69b0f408995cc92c3d 100755
--- a/src/scripts/install_packages.sh
+++ b/src/scripts/install_packages.sh
@@ -52,7 +52,7 @@ if [[ ! -d "$ROOT_FS_DIR" ]]; then
fi
# Create the temporary apt source.list used to install packages.
-APT_SOURCE="${ROOT_FS_DIR}/../sources.list"
+APT_SOURCE="${FLAGS_output_dir}/sources.list"
cat <<EOF > "$APT_SOURCE"
deb file:"$FLAGS_setup_dir" local_packages/
deb $FLAGS_server $FLAGS_suite main restricted multiverse universe
@@ -63,17 +63,29 @@ APT_CACHE_DIR="${FLAGS_output_dir}/tmp/cache/"
mkdir -p "${APT_CACHE_DIR}/archives/partial"
# Create the apt configuration file. See "man apt.conf"
-APT_CONFIG="${ROOT_FS_DIR}/../apt.conf"
+APT_PARTS="${FLAGS_output_dir}/apt.conf.d"
+mkdir -p "$APT_PARTS" # An empty apt.conf.d to avoid other configs.
+export APT_CONFIG="${FLAGS_output_dir}/apt.conf"
cat <<EOF > "$APT_CONFIG"
+APT
+{
+ Install-Recommends "0";
+ Install-Suggests "0";
+ Get
+ {
+ Assume-Yes "1";
+ };
+};
Dir
{
- Cache "$APT_CACHE_DIR"; # TODO: Empty string to disable?
+ Cache "$APT_CACHE_DIR";
Cache {
- archives "${APT_CACHE_DIR}/archives"; # TODO: Why do we need this?
+ archives "${APT_CACHE_DIR}/archives";
};
Etc
{
- sourcelist "$APT_SOURCE"
+ sourcelist "$APT_SOURCE";
+ parts "$APT_PARTS";
};
State "${ROOT_FS_DIR}/var/lib/apt/";
State
@@ -88,12 +100,12 @@ DPkg
EOF
# TODO: Full audit of the apt conf dump to make sure things are ok.
-apt-config -c="$APT_CONFIG" dump > "${ROOT_FS_DIR}/../apt.conf.dump"
+apt-config dump > "${FLAGS_output_dir}/apt.conf.dump"
# Install prod packages
COMPONENTS=`cat $FLAGS_package_list | grep -v ' *#' | grep -v '^ *$' | sed '/$/{N;s/\n/ /;}'`
-sudo apt-get -c="$APT_CONFIG" update
-sudo apt-get -c="$APT_CONFIG" --yes --force-yes --no-install-recommends \
+sudo APT_CONFIG="$APT_CONFIG" apt-get update
+sudo APT_CONFIG="$APT_CONFIG" apt-get --force-yes \
install $COMPONENTS
# Create kernel installation configuration to suppress warnings,
@@ -110,13 +122,13 @@ warn_initrd = no
EOF
# Install the kernel.
-sudo apt-get -c="$APT_CONFIG" --yes --force-yes --no-install-recommends \
+sudo APT_CONFIG="$APT_CONFIG" apt-get --force-yes \
install "linux-image-${FLAGS_kernel_version}"
# Setup bootchart.
# TODO: Move this and other developer oriented "components" into an optional
# package-list-prod-dev.txt (ideally with a better name).
-sudo apt-get -c="$APT_CONFIG" --yes --force-yes --no-install-recommends \
+sudo APT_CONFIG="$APT_CONFIG" apt-get --force-yes \
install bootchart
# Clean up the apt cache.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698