From 044a63fd3c3ecd60ffccad192c3936c8d0094ab3 Mon Sep 17 00:00:00 2001 From: Christoph Berg <myon@debian.org> Date: Thu, 16 Jan 2025 14:51:30 +0100 Subject: [PATCH] postgresql-common.config: Remove deprecation notice for old majors. --- debian/changelog | 1 + debian/postgresql-common.config | 49 ------------------------------ debian/postgresql-common.templates | 20 ------------ 3 files changed, 1 insertion(+), 69 deletions(-) diff --git a/debian/changelog b/debian/changelog index 101eac9e..a4fe72b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ postgresql-common (269) UNRELEASED; urgency=medium anyway. * Remove postgresql-contrib meta package, provide it from postgresql. * supported-versions: Remove obsolete distribution-detection code. + * postgresql-common.config: Remove deprecation notice for old majors. -- Christoph Berg <myon@debian.org> Thu, 09 Jan 2025 14:25:18 +0100 diff --git a/debian/postgresql-common.config b/debian/postgresql-common.config index 8f169e42..989b11bf 100644 --- a/debian/postgresql-common.config +++ b/debian/postgresql-common.config @@ -4,55 +4,6 @@ set -e . /usr/share/debconf/confmodule -# If we have no versions, we do not need to worry about obsolete ones -if ! [ -d /usr/lib/postgresql ] || \ - [ ! -e /usr/share/postgresql-common/supported-versions ]; then - db_stop - exit 0 -fi - -# at some points we obsolete major versions within unstable; force the -# obsoletion notifications when upgrading over those -if dpkg --compare-versions "$2" lt-nl 71 2>/dev/null; then - db_fset postgresql-common/obsolete-major seen false -fi - -# determine versions -for v in `ls /usr/lib/postgresql/`; do - # Ignore old libraries, etc. - if [ -x /usr/lib/postgresql/$v/bin/psql ]; then - AVAILABLE="$AVAILABLE $v" - fi -done - -SUPPORTED=`sh /usr/share/postgresql-common/supported-versions` -LATEST=`echo "$SUPPORTED" | sort -g | tail -1` - -db_fget postgresql-common/obsolete-major seen || true - -if [ "$RET" != "true" ]; then - for v in $AVAILABLE; do - unset sup - for s in $SUPPORTED; do - if dpkg --compare-versions "$v" ge "$s"; then - sup=1 - break - fi - done - if [ "$sup" ]; then - continue - fi - - if dpkg -s "postgresql-client-$v" 2>/dev/null | grep -q ^Version: ; then - db_fset postgresql-common/obsolete-major seen false - db_subst postgresql-common/obsolete-major old $v - db_subst postgresql-common/obsolete-major latest $LATEST - db_input high postgresql-common/obsolete-major || true - db_go || true - fi - done -fi - # createcluster.conf db_input medium postgresql-common/ssl || true db_go || true diff --git a/debian/postgresql-common.templates b/debian/postgresql-common.templates index 0055833e..a4848052 100644 --- a/debian/postgresql-common.templates +++ b/debian/postgresql-common.templates @@ -1,23 +1,3 @@ -Template: postgresql-common/obsolete-major -Type: error -_Description: Obsolete major version ${old} - The PostgreSQL version ${old} is obsolete, but the server - or client packages are still installed. Please install the latest packages - (postgresql-${latest} and postgresql-client-${latest}) and upgrade the - existing ${oldversion} clusters with pg_upgradecluster (see manpage). - . - Please be aware that the installation of postgresql-${latest} will - automatically create a default cluster ${latest}/main. If you want to upgrade - the ${old}/main cluster, you need to remove the already existing ${latest} - cluster (pg_dropcluster --stop ${latest} main, see manpage for - details). - . - The old server and client packages are no longer supported. After the - existing clusters are upgraded, the postgresql-${old} and - postgresql-client-${old} packages should be removed. - . - Please see /usr/share/doc/postgresql-common/README.Debian.gz for details. - Template: postgresql-common/ssl Type: boolean Default: true -- GitLab