From 6d04c078db61cf343fc1c348f30de4fa42c6cdd7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 15 May 2011 21:23:03 +0200 Subject: Correct derivative main sources.list entries. --- scripts/build/lb_chroot_apt | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'scripts/build/lb_chroot_apt') diff --git a/scripts/build/lb_chroot_apt b/scripts/build/lb_chroot_apt index 240fcecd1..010cc4ac6 100755 --- a/scripts/build/lb_chroot_apt +++ b/scripts/build/lb_chroot_apt @@ -133,6 +133,43 @@ case "${1}" in esac fi + case "${LB_MODE}" in + progress) + echo "# /etc/apt/preferences.d/progress.pref" > chroot/etc/apt/preferences.d/progress.pref + + case "${LB_DISTRIBUTION}" in + *-backports) + _DISTRIBUTIONS="$(echo ${LB_DISTRIBUTION} | sed -e 's|-backports||') ${LB_DISTRIBUTION}" + ;; + + *) + _DISTRIBUTIONS="${LB_DISTRIBUTION}" + ;; + esac + + if [ "${LB_SECURITY}" = "true" ] + then + case "${LB_DISTRIBUTION}" in + artax) + _DISTRIBUTION="${_DISTRIBUTION} ${LB_DISTRIBUTION}-security" + ;; + esac + fi + + for _DISTRIBUTION in ${_DISTRIBUTIONS} + do + +cat >> chroot/etc/apt/preferences.d/progress.pref << EOF + +Package: * +Pin: release n=${_DISTRIBUTION} +Pin-Priority: 999 +EOF + + done + ;; + esac + # Creating stage file Create_stagefile .stage/chroot_apt ;; @@ -216,6 +253,8 @@ case "${1}" in fi + rm -f "chroot/etc/apt/preferences.d/${LB_MODE}.pref" + # Removing stage file rm -f .stage/chroot_apt ;; -- cgit v1.2.3