From 1f43432313950930704f820a723a65320e31f93c Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Fri, 23 Dec 2016 12:38:07 -0500 Subject: [PATCH] Remove hardcoded components We can use ${DIB_DEBIAN_COMPONENTS} to get this information. We also already set the mirror. Change-Id: Idd11c2b7df1d247c6d32a5f936b8601b4741b519 Signed-off-by: Paul Belanger --- .../ubuntu-minimal/pre-install.d/01-ubuntu-apt-update | 10 ++++------ .../root.d/75-ubuntu-minimal-baseinstall | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/elements/ubuntu-minimal/pre-install.d/01-ubuntu-apt-update b/elements/ubuntu-minimal/pre-install.d/01-ubuntu-apt-update index db487e74..f5e8ca4c 100755 --- a/elements/ubuntu-minimal/pre-install.d/01-ubuntu-apt-update +++ b/elements/ubuntu-minimal/pre-install.d/01-ubuntu-apt-update @@ -21,14 +21,12 @@ fi set -eu set -o pipefail -DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://archive.ubuntu.com/ubuntu} - # We should manage this in a betterer way cat << EOF >/etc/apt/sources.list -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE main restricted universe -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-updates main restricted universe -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-backports main restricted universe -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-security main restricted universe +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE ${DIB_DEBIAN_COMPONENTS//,/ } +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-updates ${DIB_DEBIAN_COMPONENTS//,/ } +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-backports ${DIB_DEBIAN_COMPONENTS//,/ } +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-security ${DIB_DEBIAN_COMPONENTS//,/ } EOF # Need to update to retrieve the signed Release file diff --git a/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall b/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall index 35938995..24c80fa4 100755 --- a/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall +++ b/elements/ubuntu-minimal/root.d/75-ubuntu-minimal-baseinstall @@ -21,14 +21,12 @@ fi set -eu set -o pipefail -DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://archive.ubuntu.com/ubuntu} - # We should manage this in a betterer way sudo bash -c "cat << EOF >$TARGET_ROOT/etc/apt/sources.list -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE main restricted universe -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-updates main restricted universe -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-backports main restricted universe -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-security main restricted universe +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE ${DIB_DEBIAN_COMPONENTS//,/ } +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-updates ${DIB_DEBIAN_COMPONENTS//,/ } +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-backports ${DIB_DEBIAN_COMPONENTS//,/ } +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-security ${DIB_DEBIAN_COMPONENTS//,/ } EOF" sudo mount -t proc none $TARGET_ROOT/proc