From e99707b55c325193c93395b06cabfc7cd6fcebb0 Mon Sep 17 00:00:00 2001 From: Riku Voipio Date: Thu, 14 Sep 2017 10:56:39 +0300 Subject: actually make it work --- files/etc/apt/sources.list.d/backports.list/BACKPORTS | 4 ++-- files/etc/apt/sources.list.d/backports.list/preinst | 19 +++---------------- files/etc/apt/sources.list.d/linaro.list/LINARO | 3 ++- files/etc/apt/sources.list.d/linaro.list/QCOM | 4 +--- files/etc/apt/sources.list/DEBIAN | 6 +++--- 5 files changed, 11 insertions(+), 25 deletions(-) (limited to 'files') diff --git a/files/etc/apt/sources.list.d/backports.list/BACKPORTS b/files/etc/apt/sources.list.d/backports.list/BACKPORTS index 8b6f4c9..7046e1d 100644 --- a/files/etc/apt/sources.list.d/backports.list/BACKPORTS +++ b/files/etc/apt/sources.list.d/backports.list/BACKPORTS @@ -1,2 +1,2 @@ -deb {cdn}/debian {release}-backports main -deb-src {cdn}/debian {release}-backports main +deb ${cdn}/debian ${release}-backports main +deb-src ${cdn}/debian ${release}-backports main diff --git a/files/etc/apt/sources.list.d/backports.list/preinst b/files/etc/apt/sources.list.d/backports.list/preinst index 81f7d06..ee32e3a 100755 --- a/files/etc/apt/sources.list.d/backports.list/preinst +++ b/files/etc/apt/sources.list.d/backports.list/preinst @@ -1,23 +1,10 @@ #! /bin/bash -# template expansion for sources.list: -# replace {release} with the value of $release -# replace {cdn} with the value of $apt_cdn +# template expansion # $1 is the class name used # $2 is the path to the file copied -# check if a variable of the form {varname} was used at all -grep -q '{' $2 || exit 0 +envsubst < $2 > $2.tmp +mv $2.tmp $2 -if [ -z "$release" ]; then - echo "\$release is undefined. Not substituting in $2." -else - sed -i -e "s#{release}#$release#g" $2 -fi - -if [ -z "$apt_cdn" ]; then - echo "\$apt_cdn not defined. not substituting in $2." -else - sed -i -e "s#{cdn}#$apt_cdn#g" $2 -fi diff --git a/files/etc/apt/sources.list.d/linaro.list/LINARO b/files/etc/apt/sources.list.d/linaro.list/LINARO index e4da3cf..650cab0 100644 --- a/files/etc/apt/sources.list.d/linaro.list/LINARO +++ b/files/etc/apt/sources.list.d/linaro.list/LINARO @@ -1 +1,2 @@ -deb http://obs.linaro.org/qcom/${obs_release}/ ./ +deb http://obs.linaro.org/linaro-overlay-${release}/${obs_release}/ ./ + diff --git a/files/etc/apt/sources.list.d/linaro.list/QCOM b/files/etc/apt/sources.list.d/linaro.list/QCOM index de2aaba..2babf21 100644 --- a/files/etc/apt/sources.list.d/linaro.list/QCOM +++ b/files/etc/apt/sources.list.d/linaro.list/QCOM @@ -1,3 +1 @@ -deb http://obs.linaro.org/qcom/${obs_release}/ ./ -deb http://obs.linaro.org/linaro-overlay-${obs_release}/ ./ - +deb http://obs.linaro.org/qcom/${release}/ ./ diff --git a/files/etc/apt/sources.list/DEBIAN b/files/etc/apt/sources.list/DEBIAN index 16f4420..8ebdbfb 100644 --- a/files/etc/apt/sources.list/DEBIAN +++ b/files/etc/apt/sources.list/DEBIAN @@ -1,3 +1,3 @@ -deb {cdn}/debian {release} main -deb http://security.debian.org/ {release}/updates main -deb {cdn}/debian {release}-updates main +deb ${apt_cdn}/debian ${release} main +deb http://security.debian.org/ ${release}/updates main +deb ${apt_cdn}/debian ${release}-updates main -- cgit v1.2.3