diff options
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build/lb_chroot_archives | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives index 168b3afe7..0058f8e59 100755 --- a/scripts/build/lb_chroot_archives +++ b/scripts/build/lb_chroot_archives @@ -181,6 +181,9 @@ EOF fi fi + # probably too bold, needs refinment (FIXME) + rm -f chroot/etc/apt/preferences.d/* + # Configure third-party archives if [ -n "${LB_ARCHIVES}" ] then @@ -224,6 +227,15 @@ EOF "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" fi + # Adding pinning preferences (chroot) + if [ -e "${LB_BASE}/archives/${REPOSITORY}.pref" ] + then + cp "${LB_BASE}/archives/${REPOSITORY}.pref" chroot/etc/apt/sources.list.d + elif [ -e "${LB_BASE}/archives/${REPOSITORY}.pref.chroot" ] + then + cp "${LB_BASE}/archives/${REPOSITORY}.pref.chroot" "chroot/etc/apt/sources.list.d/${REPOSITORY}.pref" + fi + if [ "${LB_APT_SECURE}" != false ] then # Adding archive signing keys (chroot) @@ -262,6 +274,20 @@ EOF done fi + # Check local pinning preferences + if Find_files config/archives/*.pref || \ + Find_files config/archives/*.pref.chroot + then + for FILE in config/archives/*.pref \ + config/archives/*.pref.chroot + do + if [ -e "${FILE}" ] + then + cp config/archives/$(basename ${_FILE} .chroot) chroot/etc/apt/preferences.d + fi + done + fi + # Configure local package repository if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb then @@ -724,6 +750,9 @@ EOF fi fi + # probably too bold, needs refinment (FIXME) + rm -f chroot/etc/apt/preferences.d/* + # Configure third-party archives if [ -n "${LB_ARCHIVES}" ] then @@ -754,6 +783,15 @@ EOF "chroot/etc/apt/sources.list.d/${REPOSITORY}.list" fi + # Adding pinning preferences (binary) + if [ -e "${LB_BASE}/archives/${REPOSITORY}.pref" ] + then + cp "${LB_BASE}/archives/${REPOSITORY}.pref" chroot/etc/apt/sources.list.d + elif [ -e "${LB_BASE}/archives/${REPOSITORY}.pref.binary" ] + then + cp "${LB_BASE}/archives/${REPOSITORY}.pref.binary" "chroot/etc/apt/sources.list.d/${REPOSITORY}.pref" + fi + if [ "${LB_APT_SECURE}" != false ] then # Adding archive signing keys (binary) @@ -792,6 +830,20 @@ EOF done fi + # Check local pinning preferences + if Find_files config/archives/*.pref || \ + Find_files config/archives/*.pref.binary + then + for FILE in config/archives/*.pref \ + config/archives/*.pref.binary + do + if [ -e "${FILE}" ] + then + cp config/archives/$(basename ${_FILE} .binary) chroot/etc/apt/preferences.d + fi + done + fi + # Check local archive keys if Find_files config/archives/*.key || \ Find_files config/archives/*.key.binary |