diff --git a/elements/debian-minimal/README.rst b/elements/debian-minimal/README.rst index ead2d232..0625720a 100644 --- a/elements/debian-minimal/README.rst +++ b/elements/debian-minimal/README.rst @@ -11,6 +11,12 @@ not handle changing Packages files well across multiple out of sync mirrors, it is recommended that you choose a single mirror of debian, and pass it in via `DIB_DISTRIBUTION_MIRROR`. +By default only `main` component is used. If `DIB_DEBIAN_COMPONENTS` (comma +separated) from the `debootstrap` element has been set, that list of +components will be used instead. + +Backports are included unless `DIB_RELEASE` is `unstable`. + If necessary, a custom apt keyring and debootstrap script can be supplied to the `debootstrap` command via `DIB_APT_KEYRING` and `DIB_DEBIAN_DEBOOTSTRAP_SCRIPT` respectively. Both options require the diff --git a/elements/debian-minimal/pre-install.d/01-debian-apt-update b/elements/debian-minimal/pre-install.d/01-debian-apt-update index 52fcb547..c9ff345e 100755 --- a/elements/debian-minimal/pre-install.d/01-debian-apt-update +++ b/elements/debian-minimal/pre-install.d/01-debian-apt-update @@ -21,14 +21,17 @@ fi set -eu set -o pipefail +DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main} +components=${DIB_DEBIAN_COMPONENTS//,/ } + # We should manage this in a betterer way cat << EOF >/etc/apt/sources.list -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE main +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE $components EOF if [ $DIB_RELEASE != unstable ] ; then cat << EOF >>/etc/apt/sources.list -deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-backports main +deb $DIB_DISTRIBUTION_MIRROR $DIB_RELEASE-backports $components EOF fi