From 382d244050abbfb9f9e52ec9383d333b158ded5d Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Fri, 8 Aug 2008 21:16:42 +0100 Subject: 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). --- helpers/lh_chroot_apt | 10 ++++++++++ helpers/lh_chroot_install-packages | 17 ++--------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt index 6bfb7c3..1f8741e 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 <> chroot/etc/apt/preferences.live <