[SCM] live-build branch, debian-next, updated. debian/3.0_a15-1-4-g1f6a2cc

Daniel Baumann daniel at debian.org
Sat Apr 23 16:15:38 UTC 2011


The following commit has been merged in the debian-next branch:
commit 1f6a2cc1279dc9c862f952129f8ece458e28ecb2
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Apr 23 18:13:58 2011 +0200

    Moving apt pinning workaround to the correct place.

diff --git a/scripts/build/lb_chroot_apt b/scripts/build/lb_chroot_apt
index aa1db74..240fcec 100755
--- a/scripts/build/lb_chroot_apt
+++ b/scripts/build/lb_chroot_apt
@@ -133,14 +133,6 @@ case "${1}" in
 			esac
 		fi
 
-		# Rebuild apt indices from scratch.
-		# Due to the fact that apt doesn't understand pinning on the
-		# fly, we need to manuall remove the cached indices and fetch
-		# them again.
-		rm -f chroot/var/cache/apt/* > /dev/null 2>&1 || true
-		rm -f chroot/var/lib/apt/lists/* > /dev/null 2>&1 || true
-		Apt chroot update
-
 		# Creating stage file
 		Create_stagefile .stage/chroot_apt
 		;;
diff --git a/scripts/build/lb_chroot_sources b/scripts/build/lb_chroot_sources
index a4b3dcd..abd6379 100755
--- a/scripts/build/lb_chroot_sources
+++ b/scripts/build/lb_chroot_sources
@@ -468,6 +468,18 @@ EOF
 				Chroot chroot "apt-get ${APT_OPTIONS} install aptitude"
 			fi
 
+			# Rebuild apt indices from scratch.
+			# Due to the fact that apt doesn't understand pinning on the
+			# fly, we need to manuall remove the cached indices and fetch
+			# them again.
+			if [ -e chroot/etc/apt/preferences ] || \
+			   ls chroot/etc/apt/preferences.d/* > /dev/null 2>&1
+			then
+				rm -f chroot/var/cache/apt/* > /dev/null 2>&1 || true
+				rm -f chroot/var/lib/apt/lists/* > /dev/null 2>&1 || true
+				Apt chroot update
+			fi
+
 			# Temporary hack (FIXME)
 			if [ "${LB_DERIVATIVE}" = "true" ]
 			then

-- 
live-build



More information about the debian-live-changes mailing list