[SCM] debian-live branch, master, updated. 1.0_a48-1-25-ga5b4c4b

Chris Lamb chris at chris-lamb.co.uk
Thu Aug 7 21:15:27 UTC 2008


The following commit has been merged in the master branch:
commit a5b4c4bc0dcc287875def5c2181ecd5942247d38
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date:   Thu Aug 7 22:05:08 2008 +0100

    Ensure packages in config/chroot_local-packages override all others.
    
    This reverts config/chroot_local-packages to almost original semantics by
    giving any package in chroot_local-packages a priority of 1001, allowing
    it to "downgrade" packages and generally override the standard APT sources.
    
    I think this follows the idea of this directory more and is likely to be
    more useful with this setup - rebuilding a package simply to bump a version
    number or keeping a custom apt_preferences(5) file around kinda sucks,
    especially as it is often used as a temporary workaround.
    
    Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>

diff --git a/helpers/lh_chroot_install-packages b/helpers/lh_chroot_install-packages
index 469d0a2..169510b 100755
--- a/helpers/lh_chroot_install-packages
+++ b/helpers/lh_chroot_install-packages
@@ -47,18 +47,32 @@ then
 	# Restoring cache
 	Restore_cache cache/packages_chroot
 
+	# Ensure chroot_local-packages override all other packages
+	if [ -e chroot/etc/apt/preferences ]
+	then
+		cp chroot/etc/apt/preferences chroot/etc/apt/preferences.live
+	fi
+
+	cat >> chroot/etc/apt/preferences.live <<EOF
+Package: *
+Pin: release o=chroot_local-packages
+Pin-Priority: 1001
+EOF
+
 	# Installing packages
 	case "${LH_APT}" in
 		apt|apt-get)
-			Chroot "xargs --arg-file=/root/chroot_packages apt-get ${APT_OPTIONS} install"
+			Chroot "xargs --arg-file=/root/chroot_packages apt-get ${APT_OPTIONS} -o Dir::Etc::preferences=preferences.live install"
 			;;
 
 		aptitude)
-			Chroot "xargs --arg-file=/root/chroot_packages aptitude ${APTITUDE_OPTIONS} install"
+			Chroot "xargs --arg-file=/root/chroot_packages aptitude ${APTITUDE_OPTIONS} -o Dir::Etc::preferences=preferences.live install"
 			;;
 	esac
 
+	# Tidying up
 	rm -f chroot/root/chroot_packages
+	rm -f chroot/etc/apt/preferences.live
 
 	# Saving cache
 	Save_cache cache/packages_chroot
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 9da2c0d..3d69cd6 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -120,7 +120,7 @@ case "${1}" in
 				then
 					# Generate Release
 					echo "cd /root/local-packages && apt-ftparchive \
-						-o APT::FTPArchive::Release::Label=local-packages \
+						-o APT::FTPArchive::Release::Origin=chroot_local-packages \
 						release . > Release" | Chroot sh
 
 					_LH_DOTGNUPG_EXISTED=0

-- 
debian-live



More information about the debian-live-changes mailing list