Bugzilla – Attachment 192290 Details for
Bug 41746
Add a dev script to insert a new syspref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41746: Do not overwrite atomic file if exists
06b696b.patch (text/plain), 1.25 KB, created by
Jonathan Druart
on 2026-02-02 11:12:02 UTC
(
hide
)
Description:
Bug 41746: Do not overwrite atomic file if exists
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-02-02 11:12:02 UTC
Size:
1.25 KB
patch
obsolete
>From 06b696b1acfc926f90e2c2727fbeff09911f9d10 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 2 Feb 2026 09:47:38 +0100 >Subject: [PATCH] Bug 41746: Do not overwrite atomic file if exists > >--- > misc/devel/add_syspref.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/misc/devel/add_syspref.pl b/misc/devel/add_syspref.pl >index 99c3824cf75..9197a038c82 100755 >--- a/misc/devel/add_syspref.pl >+++ b/misc/devel/add_syspref.pl >@@ -116,6 +116,13 @@ my $new_pref_content = sprintf q{$dbh->do( > ( defined $pref->{options} ? qq{'$pref->{options}'} : 'NULL' ), $pref->{explanation}, $pref->{type}, > $pref->{variable}; > my $atomic_filepath = "installer/data/mysql/atomicupdate/bug_${bug_number}.pl"; >+while ( -e $atomic_filepath ) { >+ my $input = prompt("Atomic update file already exists, overwrite it? [y/N]"); >+ last if $input =~ /^y$/i; >+ $atomic_filepath = prompt("New atomic update filename? "); >+ $atomic_filepath = "installer/data/mysql/atomicupdate/$atomic_filepath"; >+} >+ > say "Adding syspref to sysprefs.sql and creating new atomicupdate file ($atomic_filepath)"; > qx{cp installer/data/mysql/atomicupdate/skeleton.pl $atomic_filepath}; > my $content = read_file($atomic_filepath); >-- >2.43.0 >
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 41746
:
192288
|
192289
| 192290 |
192291
|
192292