From 2992ea058b32aec096d4159a186dbd44dc1bad0c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 15 Sep 2026 17:30:20 +0100 Subject: [PATCH] Bug 40901: (QA follow-up) Migrate debconf answers from koha-common to koha-core The debconf questions moved from the koha-common/* to the koha-core/* namespace, but nothing carried the existing answers across, so a site that had opted out of automatic translation updates was asked again and defaulted back to "yes". koha-core.config now seeds the new question, including its "seen" flag, from the old one when it exists. debian/koha-common.templates was left behind after koha-common.config was deleted; the metapackage registered three questions that no config script ever asks, so remove it. Co-Authored-By: Claude Fable 5.1 Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- debian/koha-common.templates | 25 ------------------------- debian/koha-core.config | 10 ++++++++++ 2 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 debian/koha-common.templates diff --git a/debian/koha-common.templates b/debian/koha-common.templates deleted file mode 100644 index a6e86d2102..0000000000 --- a/debian/koha-common.templates +++ /dev/null @@ -1,25 +0,0 @@ -Template: koha-common/3.2-3.4-upgrade-notice -Type: note -Description: koha-common upgrade actions required - If you are upgrading from a Koha 3.2 to 3.4 release, you must run: - sudo /usr/sbin/koha-upgrade-to-3.4 - . - For large catalogues, running this may take a while. Your Koha installation - should be largely operational during the process, but some things, - particularly to do with items, may appear strange until the upgrade and - re-index is complete. - -Template: koha-common/automatically-update-translations -Type: boolean -Default: true -Description: automatically update translations - When Koha is upgraded, any existing translated templates can be regenerated - to keep everything in sync. Select "yes" if you want this. - -Template: koha-common/rename-apache-vhost-files -Type: boolean -Default: true -Description: Rename the Apache virtual hosts files for Koha instances? - When Koha is upgraded, the Apache's virtual host definition files can be - renamed to match the needs of the newer Apache 2.4. Previously defined - Koha instances will get their Apache files appended '.conf'. diff --git a/debian/koha-core.config b/debian/koha-core.config index 3ce8eb6ae0..82ae1cf928 100755 --- a/debian/koha-core.config +++ b/debian/koha-core.config @@ -23,6 +23,16 @@ set -e CONFIGFILE=/etc/koha/koha-common.conf +# Carry the answer (and its "seen" flag) over from the pre-split koha-common +# package so upgrading sites are not asked again. The value from +# $CONFIGFILE below still wins when the file exists. +if db_get koha-common/automatically-update-translations && [ -n "$RET" ]; then + db_set koha-core/automatically-update-translations "$RET" + if db_fget koha-common/automatically-update-translations seen && [ "$RET" = "true" ]; then + db_fset koha-core/automatically-update-translations seen true + fi +fi + if [ -e $CONFIGFILE ]; then . $CONFIGFILE || true # Put the current values into debconf