summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-08-10 07:03:27 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:38 +0100
commit7245d22f2486e48a12fece7a3fcc283d9a34f248 (patch)
treed8b93f8975b3e412309c6e6647882b87f6722725
parent74ef06a44e5a25e84768444ded41352e90d130fe (diff)
downloadlive-build-7245d22f2486e48a12fece7a3fcc283d9a34f248.zip
live-build-7245d22f2486e48a12fece7a3fcc283d9a34f248.tar.gz
Fix a bug in chroot_local-packages where packages were upgraded with themselves during lh_binary stages.
-rwxr-xr-xhelpers/lh_chroot_apt33
1 files changed, 23 insertions, 10 deletions
diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt
index 1f8741e..1e6ab56 100755
--- a/helpers/lh_chroot_apt
+++ b/helpers/lh_chroot_apt
@@ -112,6 +112,15 @@ case "${1}" in
cp config/chroot_apt/preferences chroot/etc/apt/preferences
fi
+ if Find_files config/chroot_local-packages/*.deb
+ then
+ # Ensure local packages have priority
+ echo >> chroot/etc/apt/preferences
+ echo "Package: *" >> chroot/etc/apt/preferences
+ echo "Pin: release o=chroot_local-packages" >> chroot/etc/apt/preferences
+ echo "Pin-Priority: 1001" >> chroot/etc/apt/preferences
+ fi
+
# Creating stage file
Create_stagefile .stage/chroot_apt
;;
@@ -151,6 +160,20 @@ case "${1}" in
rm -f chroot/etc/apt/preferences
fi
+ if Find_files config/chroot_local-packages/*.deb
+ then
+ # Ensure local packages are not re-installed during lh_binary
+ echo >> chroot/etc/apt/preferences
+ echo "Package: *" >> chroot/etc/apt/preferences
+ echo "Pin: release o=chroot_local-packages" >> chroot/etc/apt/preferences
+ echo "Pin-Priority: 99" >> chroot/etc/apt/preferences
+
+ echo >> chroot/etc/apt/preferences
+ echo "Package: *" >> chroot/etc/apt/preferences
+ echo "Pin: release o=debian" >> chroot/etc/apt/preferences
+ echo "Pin-Priority: 99" >> chroot/etc/apt/preferences
+ fi
+
# Removing stage file
rm -f .stage/chroot_apt
;;
@@ -159,13 +182,3 @@ case "${1}" in
Usage
;;
esac
-
-if ls config/chroot_local-packages/*.deb > /dev/null 2>&1
-then
- cat >>chroot/etc/apt/preferences <<EOF
-
-Package: *
-Pin: release o=chroot_local-packages
-Pin-Priority: 1001
-EOF
-fi