summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-01-07 19:47:41 +0100
committerDaniel Baumann <daniel@debian.org>2012-01-07 19:59:53 +0100
commitac004b56d239e88caa3edd986db8a24e7727a458 (patch)
tree8561795f05cf3deeae819f5ce24e20bf5c2e44fb
parent4581e49d4e75721bee16dd1b4c57fb3b4d56ec7c (diff)
downloadvyos-live-build-ac004b56d239e88caa3edd986db8a24e7727a458.tar.gz
vyos-live-build-ac004b56d239e88caa3edd986db8a24e7727a458.zip
Adding support for apt preference.d in config/chroot_apt.
-rwxr-xr-xscripts/build/lb_chroot_apt31
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/build/lb_chroot_apt b/scripts/build/lb_chroot_apt
index 6414701d4..81990b12f 100755
--- a/scripts/build/lb_chroot_apt
+++ b/scripts/build/lb_chroot_apt
@@ -108,6 +108,19 @@ case "${1}" in
cp config/chroot_apt/preferences chroot/etc/apt/preferences
fi
+ if Find_files config/chroot_apt/*.pref
+ then
+ for _FILE in config/chroot_apt/*.pref
+ do
+ if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
+ then
+ mv chroot/etc/apt/preferences.d/$(basename ${_FILE}) chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig
+ fi
+
+ cp ${_FILE} chroot/etc/apt/preferences.d
+ done
+ fi
+
if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb
then
echo >> chroot/etc/apt/preferences
@@ -236,6 +249,24 @@ EOF
fi
fi
+ if Find_files config/chroot_apt/*.pref
+ then
+ for _FILE in config/chroot_apt/*.pref
+ do
+ if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
+ then
+ mv chroot/etc/apt/preferences.d/$(basename ${_FILE}) chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig
+ fi
+
+ cp ${_FILE} chroot/etc/apt/preferences.d
+
+ if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
+ then
+ mv chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig chroot/etc/apt/preferences.d/$(basename ${_FILE})
+ fi
+ done
+ fi
+
if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb
then
if [ -f chroot/etc/apt/preferences ]