Bugzilla – Attachment 180084 Details for
Bug 39460
Debian package install broken in 24.11 if no database change included in package (e.g. 24.11.03-2)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39460: Fix koha-upgrade-schema when no DB change needed
Bug-39460-Fix-koha-upgrade-schema-when-no-DB-chang.patch (text/plain), 2.12 KB, created by
David Cook
on 2025-04-01 01:55:40 UTC
(
hide
)
Description:
Bug 39460: Fix koha-upgrade-schema when no DB change needed
Filename:
MIME Type:
Creator:
David Cook
Created:
2025-04-01 01:55:40 UTC
Size:
2.12 KB
patch
obsolete
>From 247514a219e1ef1bd7d30419b97c5927f53f263e Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 1 Apr 2025 01:52:27 +0000 >Subject: [PATCH] Bug 39460: Fix koha-upgrade-schema when no DB change needed > >This patch fixes koha-upgrade-schema so that it returns an exit >code of 0 whether or not a DB change is needed. This is important >so that koha-common.postinst proceeds correctly even when there >is no DB change needed (e.g. for 24.11.03-2) > >Test plan: >0. Apply the patch >1. cp debian/scripts/koha-upgrade-schema /usr/sbin/koha-upgrade-schema >2. dpkg-reconfigure koha-common >3. Note the process completes correctly >4. koha-upgrade-schema kohadev >5. Note following text appears very quickly: >Upgrading database schema for kohadev >No database change required >6. koha-mysql kohadev >update systempreferences set value = '24.1102000' where variable = 'Version'; >7. Clear memcached >8. koha-upgrade-schema kohadev >9. Note that it applies the 24.11.03 database upgrade >--- > debian/scripts/koha-upgrade-schema | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/debian/scripts/koha-upgrade-schema b/debian/scripts/koha-upgrade-schema >index 66a52b0f66..01d9b69662 100755 >--- a/debian/scripts/koha-upgrade-schema >+++ b/debian/scripts/koha-upgrade-schema >@@ -41,12 +41,15 @@ for name in "$@" > do > if is_instance $name; then > echo "Upgrading database schema for $name" >- KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \ >+ if KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \ > PERL5LIB=$PERL5LIB \ >- "$CGI_PATH/installer/data/mysql/needs_update.pl" && \ >- KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \ >- PERL5LIB=$PERL5LIB \ >- "$CGI_PATH/installer/data/mysql/updatedatabase.pl" >+ "$CGI_PATH/installer/data/mysql/needs_update.pl"; then >+ KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \ >+ PERL5LIB=$PERL5LIB \ >+ "$CGI_PATH/installer/data/mysql/updatedatabase.pl" >+ else >+ echo "No database change required" >+ fi > else > die "Error: Invalid instance name $name" > fi >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39460
:
180084
|
180085
|
180223