From 3e2b20ca40a956e45e4ff0c7c61e60a17fc229e3 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 24 Jul 2025 15:00:23 +0200 Subject: [PATCH] Bug 39740: Fix a few occurrences of dev_install in code Content-Type: text/plain; charset=utf-8 Test plan: Check if git_install is set correctly for your system in koha-conf.xml. Adjust otherwise. cp debian/scripts/koha-functions.sh /usr/share/koha/bin/ cp debian/scripts/koha-* /usr/sbin/ Run koha-shell your_clone. Does that works like expected? Run t/Koha/Config.t. Signed-off-by: Marcel de Rooy --- debian/scripts/koha-shell | 5 ++--- t/Koha/Config.t | 2 +- t/data/koha-conf.xml | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/debian/scripts/koha-shell b/debian/scripts/koha-shell index 808fc13b64..4711dc8cf5 100755 --- a/debian/scripts/koha-shell +++ b/debian/scripts/koha-shell @@ -84,9 +84,8 @@ sub read_perl5lib { my $result = `grep "^PERL5LIB=" /etc/default/koha-common`; chomp $result; $result =~ s/^PERL5LIB=\s*//; - my $dev_install = `xmlstarlet sel -t -v 'yazgfs/config/dev_install' /etc/koha/sites/$instance/koha-conf.xml`; - chomp $dev_install; - if ( $dev_install ) { + my $git_install = `. /usr/share/koha/bin/koha-functions.sh; if is_git_install $instance; then echo 1; fi`; + if ( $git_install ) { # pick PERL5LIB from the intranetdir entry $result = `xmlstarlet sel -t -v "yazgfs/config/intranetdir" /etc/koha/sites/$instance/koha-conf.xml`; $result = "$result:$result/lib"; diff --git a/t/Koha/Config.t b/t/Koha/Config.t index 7172647ff6..b7534f0bca 100755 --- a/t/Koha/Config.t +++ b/t/Koha/Config.t @@ -226,7 +226,7 @@ subtest 'read_from_file() tests' => sub { 'timezone' => '', 'bcrypt_settings' => '__BCRYPT_SETTINGS__', 'encryption_key' => '__ENCRYPTION_KEY__', - 'dev_install' => '0', + 'git_install' => '0', 'strict_sql_modes' => '0', 'plugin_repos' => '', 'koha_xslt_security' => '', diff --git a/t/data/koha-conf.xml b/t/data/koha-conf.xml index 1accab3c20..404939818f 100644 --- a/t/data/koha-conf.xml +++ b/t/data/koha-conf.xml @@ -229,10 +229,10 @@ __ENCRYPTION_KEY__ - 0 + 0 0