Bugzilla – Attachment 191740 Details for
Bug 36067
Inconsistencies in --commit, --confirm for command line scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36067: Use '--confirm' across commandline scripts
Bug-36067-Use---confirm-across-commandline-scripts.patch (text/plain), 8.19 KB, created by
Aleisha Amohia
on 2026-01-21 02:48:23 UTC
(
hide
)
Description:
Bug 36067: Use '--confirm' across commandline scripts
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2026-01-21 02:48:23 UTC
Size:
8.19 KB
patch
obsolete
>From 1270cdad924acc951cdfd766fedb52698a71611b Mon Sep 17 00:00:00 2001 >From: John Doe <you@example.com> >Date: Wed, 21 Jan 2026 02:29:38 +0000 >Subject: [PATCH] Bug 36067: Use '--confirm' across commandline scripts > >This patch changes commandline scripts using --commit to use --confirm instead, to be more consistent. >--- > debian/docs/koha-elasticsearch.xml | 4 ++-- > debian/scripts/koha-elasticsearch | 6 +++--- > misc/cronjobs/crontab.example | 2 +- > misc/cronjobs/delete_items.pl | 10 +++++----- > misc/cronjobs/longoverdue.pl | 2 +- > misc/cronjobs/patron_emailer.pl | 2 +- > misc/link_bibs_to_authorities.pl | 4 ++-- > misc/search_tools/rebuild_elasticsearch.pl | 4 ++-- > 8 files changed, 17 insertions(+), 17 deletions(-) > >diff --git a/debian/docs/koha-elasticsearch.xml b/debian/docs/koha-elasticsearch.xml >index a0b5f2e4424..8f41aa72259 100644 >--- a/debian/docs/koha-elasticsearch.xml >+++ b/debian/docs/koha-elasticsearch.xml >@@ -35,7 +35,7 @@ > <arg>-b|--biblios</arg> > <arg>-a|--authorities</arg> > <arg>-w|--where</arg> >- <arg>-c n|--commit n</arg> >+ <arg>-c n|--confirm n</arg> > <arg>-v|--verbose</arg> > <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg> > </cmdsynopsis> >@@ -89,7 +89,7 @@ > </listitem> > </varlistentry> > <varlistentry> >- <term><option>-c, --commit</option></term> >+ <term><option>-c, --confirm</option></term> > <listitem> > <para>Specifies how many records will be batched up before they are added to Elasticsearch (default: 5000). > Higher values lead to better performance, but take more RAM.</para> >diff --git a/debian/scripts/koha-elasticsearch b/debian/scripts/koha-elasticsearch >index e9a0a1ba107..c517cdc9567 100755 >--- a/debian/scripts/koha-elasticsearch >+++ b/debian/scripts/koha-elasticsearch >@@ -42,7 +42,7 @@ Options: > --reset|-r Reset elasticsearch mappings from file. > --authorities|-a Only run process for authorities. > --biblios|-b Only run process for biblios. >- -c|--commit n Specify how many records will be batched up before >+ -c|--confirm n Specify how many records will be batched up before > they're added to Elasticsearch (default: 5000). > -p|--processes n Specify the number of parallel processes to use > for indexing. >@@ -90,7 +90,7 @@ run_rebuild_elasticsearch() > if [ "${clo_commit_size}" -gt 0 ] 2>/dev/null; then > commit_size=${clo_commit_size} > fi >- rebuild_opts="--commit ${commit_size}" >+ rebuild_opts="--confirm ${commit_size}" > > if [ "${clo_processes}" -gt 0 ] 2>/dev/null; then > processes=${clo_processes} >@@ -160,7 +160,7 @@ while [ -n "$*" ]; do > -a|--authorities) > toggle_authorities_only > ;; >- -c|--commit) >+ -c|--confirm) > clo_commit_size="$2" ; shift > ;; > -p|--processes) >diff --git a/misc/cronjobs/crontab.example b/misc/cronjobs/crontab.example >index 4d609cf081d..4a1ca5d7af9 100644 >--- a/misc/cronjobs/crontab.example >+++ b/misc/cronjobs/crontab.example >@@ -79,7 +79,7 @@ KOHA_CRON_PATH = /usr/share/koha/bin/cronjobs > 0 1 * * * __KOHA_USER__ $KOHA_CRON_PATH/holds/auto_unsuspend_holds.pl > /dev/null 2>&1 > > # Update popularity counts for biblio records >-0 2 * * * __KOHA_USER__ $KOHA_CRON_PATH/update_totalissues.pl --commit=1000 --use-stats --incremental --interval=1d >/dev/null 2>&1 >+0 2 * * * __KOHA_USER__ $KOHA_CRON_PATH/update_totalissues.pl --confirm=1000 --use-stats --incremental --interval=1d >/dev/null 2>&1 > > # ZEBRA INDEX UPDATES with -z option, incremental index updates throughout the day > # for both authorities and bibs >diff --git a/misc/cronjobs/delete_items.pl b/misc/cronjobs/delete_items.pl >index 0b5a737517b..36fd9933fa5 100755 >--- a/misc/cronjobs/delete_items.pl >+++ b/misc/cronjobs/delete_items.pl >@@ -92,7 +92,7 @@ delete_items.pl - A batch item deletion tool, which generates a query against th > > delete_items.pl [--help|--manual] > >-delete_items.pl [--verbose] --where "I<SQL CONDITIONAL EXPRESSION>" ... [--commit] >+delete_items.pl [--verbose] --where "I<SQL CONDITIONAL EXPRESSION>" ... [--confirm] > > =cut > >@@ -119,9 +119,9 @@ The C<--where> option may called multiple times. The following argument > must be a syntactically valid SQL statement which is part of the C<WHERE> > clause querying the items table. These are joined by C<AND>. > >-=item B<--commit> >+=item B<--confirm> > >-No items will be deleted unless the C<--commit> flag is present. >+No items will be deleted unless the C<--confirm> flag is present. > > =item B<--del_bibs> > >@@ -135,9 +135,9 @@ Deletes the bibliographic record if the last item is deleted. > > The following is an example of this script: > >- delete_items.pl --where "withdrawn ! 0" --where "withdrawn_on < $(date --date="13 month ago" --rfc-3339=date)" --commit >+ delete_items.pl --where "withdrawn ! 0" --where "withdrawn_on < $(date --date="13 month ago" --rfc-3339=date)" --confirm > >- delete_items.pl --where "itemlost >= '1'" --where "itemlost <='4'" --where "itemlost_on < '2014-04-28'" --commit >+ delete_items.pl --where "itemlost >= '1'" --where "itemlost <='4'" --where "itemlost_on < '2014-04-28'" --confirm > > =cut > >diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl >index 5657588b62f..d2d8993d92c 100755 >--- a/misc/cronjobs/longoverdue.pl >+++ b/misc/cronjobs/longoverdue.pl >@@ -135,7 +135,7 @@ if ($list_itemtypes) { > [ --skip-category BORROWER_CATEGORY ] ... > [ --library LIBRARY_CODE ] [ --skip-library LIBRARY_CODE ] ... > [ --skip-lost-value LOST_VALUE [ --skip-lost-value LOST_VALUE ] ] >- [ --commit ] >+ [ --confirm ] > > > WARNING: Flippant use of this script could set all or most of the items in your catalog to Lost and charge your >diff --git a/misc/cronjobs/patron_emailer.pl b/misc/cronjobs/patron_emailer.pl >index dd2da261878..a3fbcf0edb2 100755 >--- a/misc/cronjobs/patron_emailer.pl >+++ b/misc/cronjobs/patron_emailer.pl >@@ -43,7 +43,7 @@ patron_emailer.pl > --from specified email for 'from' address, report column 'from' used if not specified > --email specified column to use as 'to' email address, report column 'email' used if not specified > --verbose increased verbosity, will print notices and errors >- --commit send emails, without this script will only report >+ --confirm send emails, without this script will only report > > =head1 OPTIONS > >diff --git a/misc/link_bibs_to_authorities.pl b/misc/link_bibs_to_authorities.pl >index c9d5aa308ce..bb5c7d0d7c0 100755 >--- a/misc/link_bibs_to_authorities.pl >+++ b/misc/link_bibs_to_authorities.pl >@@ -290,7 +290,7 @@ link_bibs_to_authorities.pl > link_bibs_to_authorities.pl > link_bibs_to_authorities.pl -v > link_bibs_to_authorities.pl -l >- link_bibs_to_authorities.pl --commit=1000 >+ link_bibs_to_authorities.pl --confirm=1000 > link_bibs_to_authorities.pl --auth-limit=STRING > link_bibs_to_authorities.pl --bib-limit=STRING > link_bibs_to_authorities.pl -g=700 >@@ -325,7 +325,7 @@ user-specified WHERE clause. > > Only process those bib records that match the user-specified WHERE clause. > >-=item B<--commit=N> >+=item B<--confirm=N> > > Commit the results to the database after every N records are processed. > >diff --git a/misc/search_tools/rebuild_elasticsearch.pl b/misc/search_tools/rebuild_elasticsearch.pl >index 406e5ed700c..6df54b31df5 100755 >--- a/misc/search_tools/rebuild_elasticsearch.pl >+++ b/misc/search_tools/rebuild_elasticsearch.pl >@@ -26,7 +26,7 @@ rebuild_elasticsearch.pl - inserts records from a Koha database into Elasticsear > =head1 SYNOPSIS > > B<rebuild_elasticsearch.pl> >-[B<-c|--commit>=C<count>] >+[B<-c|--confirm>=C<count>] > [B<-d|--delete>] > [B<-r|--reset>] > [B<-a|--authorities>] >@@ -48,7 +48,7 @@ Inserts records from a Koha database into Elasticsearch. > > =over > >-=item B<-c|--commit>=C<count> >+=item B<-c|--confirm>=C<count> > > Specify how many records will be batched up before they're added to Elasticsearch. > Higher should be faster, but will cause more RAM usage. Default is 5000. >-- >2.39.5
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 36067
:
191738
|
191740
|
191880