summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_apt
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-08-08 21:16:42 +0100
committerChris Lamb <chris@chris-lamb.co.uk>2008-08-08 21:28:52 +0100
commita3277ebaaee064a514192595b3b8e0de1b889cb8 (patch)
treecaedb096210eab5958a35b1b322a414741c0cb77 /helpers/lh_chroot_apt
parente6eda5f5cd4b071e4ea4d7702f479bce7a3c367e (diff)
downloadvyos-live-build-a3277ebaaee064a514192595b3b8e0de1b889cb8.tar.gz
vyos-live-build-a3277ebaaee064a514192595b3b8e0de1b889cb8.zip
Always add our apt_preference(5) pinning stanza when using local-packages.
This mostly reverts my most recent chroot_local-packages/preferences commit as I found problems when re-running parts of the build: as the pinning stanza was removed, calls to "apt-get upgrade" from within live-helper would remove replacement packages placed in chroot_local-packages. This isn't 100% foolproof - running apt-get upgrade on the binary image may still attempt to remove replacement packages (heavy users of this should probably be using their own repo for this sort of thing anyway). Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Diffstat (limited to 'helpers/lh_chroot_apt')
-rwxr-xr-xhelpers/lh_chroot_apt10
1 files changed, 10 insertions, 0 deletions
diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt
index 6bfb7c352..1f8741ee9 100755
--- a/helpers/lh_chroot_apt
+++ b/helpers/lh_chroot_apt
@@ -159,3 +159,13 @@ 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