diff options
author | Chris Lamb <chris@chris-lamb.co.uk> | 2008-08-12 19:17:39 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:39 +0100 |
commit | 36929d21720d735968fece30905ef87d8da45dd2 (patch) | |
tree | 587f5bfadbca77bd5370ecc5c31c763288446882 /helpers/lh_chroot_apt | |
parent | ce605e2a900e42dfad7c91c29abdbe4df4906806 (diff) | |
download | live-build-36929d21720d735968fece30905ef87d8da45dd2.zip live-build-36929d21720d735968fece30905ef87d8da45dd2.tar.gz |
Ensure the binary image does not inherit the binary stage's APT settings.
Diffstat (limited to 'helpers/lh_chroot_apt')
-rwxr-xr-x | helpers/lh_chroot_apt | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt index 1e6ab56..8564bf4 100755 --- a/helpers/lh_chroot_apt +++ b/helpers/lh_chroot_apt @@ -32,7 +32,7 @@ Set_defaults Require_stagefile .stage/bootstrap case "${1}" in - install) + install*) Echo_message "Configuring file /etc/apt/apt.conf" # Checking stage file @@ -114,11 +114,26 @@ case "${1}" in 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 + + case "${1}" in + install) + # Ensure local packages have priority + echo "Pin-Priority: 1001" >> chroot/etc/apt/preferences + ;; + + install-binary) + # Ensure local packages are not re-installed during lh_binary + 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 + ;; + esac fi # Creating stage file @@ -162,7 +177,7 @@ case "${1}" in if Find_files config/chroot_local-packages/*.deb then - # Ensure local packages are not re-installed during lh_binary + # Ensure local packages are not replaced. echo >> chroot/etc/apt/preferences echo "Package: *" >> chroot/etc/apt/preferences echo "Pin: release o=chroot_local-packages" >> chroot/etc/apt/preferences |