[SCM] live-build branch, debian-next, updated. debian/3.0_a51-1-17-g600275f

Daniel Baumann daniel at debian.org
Wed Jul 18 19:03:31 UTC 2012


The following commit has been merged in the debian-next branch:
commit 600275fcf9a950fcbb16dc3b2af352b681e76547
Author: Daniel Baumann <daniel at debian.org>
Date:   Wed Jul 18 21:03:20 2012 +0200

    Adding support for pinning preferences files in config/archives/*.pref{.chroot,.binary}.

diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives
index 168b3af..0058f8e 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

-- 
live-build



More information about the debian-live-changes mailing list