From 21dfc19a8a02450ea0de44332707ea4aeb9dd212 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 20 Oct 2019 21:02:43 +0200 Subject: Using pin priority 100 for backports if the corresponding base release has not been selected in progress-linux apt sources handling. Signed-off-by: Daniel Baumann --- debian/progress-linux.postinst | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/debian/progress-linux.postinst b/debian/progress-linux.postinst index a1617f1..8dc75c6 100755 --- a/debian/progress-linux.postinst +++ b/debian/progress-linux.postinst @@ -54,11 +54,21 @@ Configure_apt_preferences () { ARCHIVE="${1}" + case "${ARCHIVE}" in + *-backports*) + PIN_PRIORITY="${BACKPORTS_PRIORITY}" + ;; + + *) + PIN_PRIORITY="999" + ;; + esac + cat >> "/etc/apt/preferences.d/${PROJECT}.pref" << EOF Package: * Pin: release n=${ARCHIVE} -Pin-Priority: 999 +Pin-Priority: ${PIN_PRIORITY} EOF } @@ -125,6 +135,17 @@ case "${1}" in db_stop + BACKPORTS_PRIORITY="100" + + for ARCHIVE in ${ARCHIVES} + do + case "${ARCHIVE}" in + engywuck|fuchur) + BACKPORTS_PRIORITY="999" + ;; + esac + done + DEBIAN_VERSION="$(cat /etc/debian_version)" case "${DEBIAN_VERSION}" in -- cgit v1.2.3