summaryrefslogtreecommitdiff
path: root/scripts/build/source_debian
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2013-09-18 08:38:24 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2013-09-18 09:49:03 +0200
commit1cdc2fc5b49733a9a5dd4f890729dab62eaa1663 (patch)
treeff181af9f7bd8a46db4bde3b3d269e9dbcbebee8 /scripts/build/source_debian
parent4a5d67c5b8408be17c4bb5e7879a54df6ae00cd9 (diff)
downloadvyos-live-build-1cdc2fc5b49733a9a5dd4f890729dab62eaa1663.tar.gz
vyos-live-build-1cdc2fc5b49733a9a5dd4f890729dab62eaa1663.zip
Making workaround for apt-get source actually working in backports-included-but-not-enabled scenarios.
Diffstat (limited to 'scripts/build/source_debian')
-rwxr-xr-xscripts/build/source_debian16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/build/source_debian b/scripts/build/source_debian
index ca506b914..a619288c5 100755
--- a/scripts/build/source_debian
+++ b/scripts/build/source_debian
@@ -116,15 +116,19 @@ case "${LB_MODE}" in
;;
*)
- if grep -qs "-backports" chroot/etc/apt/sources.list.d/progress-linux.list
+ if grep -qs "${LB_DISTRIBUTION}-backports" chroot/etc/apt/sources.list.d/progress-linux.list
then
+ cp chroot/etc/apt/sources.list.d/progress-linux.list chroot/etc/apt/sources.list.d/progress-linux.list.orig
+
while read _LINE
do
if echo "${_LINE}" | grep -qs ${LB_DISTRIBUTION}-backports
then
sed -i -e "s|${_LINE}|#${_LINE}|" chroot/etc/apt/sources.list.d/progress-linux.list
fi
- done < chroot/etc/apt/sources.list.d/progress-linux.list
+ done < chroot/etc/apt/sources.list.d/progress-linux.list.orig
+
+ Apt chroot update
fi
;;
esac
@@ -183,5 +187,13 @@ do
mv chroot/"${SOURCE}"_* source/debian/"${LETTER}"/"${SOURCE}"
done
+# Reverting apt sources again
+if [ -e chroot/etc/apt/sources.list.d/progress-linux.list.orig ]
+then
+ mv chroot/etc/apt/sources.list.d/progress-linux.list.orig chroot/etc/apt/sources.list.d/progress-linux.list
+
+ Apt chroot update
+fi
+
# Creating stage file
Create_stagefile .build/source_debian