summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-12-04 12:07:51 +0100
committerDaniel Baumann <daniel@debian.org>2012-12-04 12:07:51 +0100
commit6a206425e8400fddb362c013d70024e834e8b1a4 (patch)
tree80cf071e0b6e06801b6d2b2d75269a2deb0325c5 /scripts/build
parentdabe28bdd3da1de9514c7c2d6693e2862d55f123 (diff)
downloadvyos-live-build-6a206425e8400fddb362c013d70024e834e8b1a4.tar.gz
vyos-live-build-6a206425e8400fddb362c013d70024e834e8b1a4.zip
Adding support for local apt conf.d snippets in archive definitions (Closes: #685791).
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/chroot_archives37
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives
index 27c8acc83..da8417ef0 100755
--- a/scripts/build/chroot_archives
+++ b/scripts/build/chroot_archives
@@ -229,6 +229,15 @@ EOF
fi
done
+ # Adding apt configuration (chroot)
+ for _FILE in "${_BASE}/archives/${REPOSITORY}.conf" "${_BASE}/archives/${REPOSITORY}.conf.chroot"
+ do
+ if [ -e "${_FILE}" ]
+ then
+ cp "${_FILE}" "chroot/etc/apt/conf.d/${REPOSITORY}.conf"
+ fi
+ done
+
# Adding apt preferences (chroot)
for _FILE in "${_BASE}/archives/${REPOSITORY}.pref" "${_BASE}/archives/${REPOSITORY}.pref.chroot"
do
@@ -271,6 +280,15 @@ EOF
fi
done
+ # Adding local apt configuration (chroot)
+ for FILE in config/archives/*.conf config/archives/*.conf.chroot
+ do
+ if [ -e "${FILE}" ]
+ then
+ cp ${FILE} chroot/etc/apt/conf.d/$(basename ${FILE} .chroot)
+ fi
+ done
+
# Adding local apt preferences (chroot)
for FILE in config/archives/*.pref config/archives/*.pref.chroot
do
@@ -742,6 +760,7 @@ EOF
fi
# probably too bold, needs refinment (FIXME)
+ rm -f chroot/etc/apt/conf.d/*
rm -f chroot/etc/apt/preferences.d/*
# Configure third-party archives
@@ -771,6 +790,15 @@ EOF
fi
done
+ # Adding apt configuration (binary)
+ for _FILE in "${_BASE}/archives/${REPOSITORY}.conf" "${_BASE}/archives/${REPOSITORY}.conf.binary"
+ do
+ if [ -e "${_FILE}" ]
+ then
+ cp "${_FILE}" "chroot/etc/apt/conf.d/${REPOSITORY}.conf"
+ fi
+ done
+
# Adding apt preferences (binary)
for _FILE in "${_BASE}/archives/${REPOSITORY}.pref" "${_BASE}/archives/${REPOSITORY}.pref.binary"
do
@@ -813,6 +841,15 @@ EOF
fi
done
+ # Adding local apt configuration (binary)
+ for FILE in config/archives/*.conf config/archives/*.conf.binary
+ do
+ if [ -e "${FILE}" ]
+ then
+ cp ${FILE} chroot/etc/apt/conf.d/$(basename ${FILE} .binary)
+ fi
+ done
+
# Adding local apt preferences (binary)
for FILE in config/archives/*.pref config/archives/*.pref.binary
do