Bugzilla – Attachment 187320 Details for
Bug 36027
search_for_data_inconsistencies.pl - add options so you can choose what checks to run
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36027: (follow-up) Fix the use of --skip-* options
Bug-36027-follow-up-Fix-the-use-of---skip--options.patch (text/plain), 2.63 KB, created by
Hammat wele
on 2025-10-02 19:56:38 UTC
(
hide
)
Description:
Bug 36027: (follow-up) Fix the use of --skip-* options
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-10-02 19:56:38 UTC
Size:
2.63 KB
patch
obsolete
>From 837066f71a22405f2376082165b7f670bcb329bc Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Thu, 2 Oct 2025 19:56:00 +0000 >Subject: [PATCH] Bug 36027: (follow-up) Fix the use of --skip-* options > >--- > .../search_for_data_inconsistencies.pl | 37 ++++++++++++++++--- > 1 file changed, 31 insertions(+), 6 deletions(-) > >diff --git a/misc/maintenance/search_for_data_inconsistencies.pl b/misc/maintenance/search_for_data_inconsistencies.pl >index d7ce1472c3e..84794a8a9ac 100755 >--- a/misc/maintenance/search_for_data_inconsistencies.pl >+++ b/misc/maintenance/search_for_data_inconsistencies.pl >@@ -84,6 +84,9 @@ pod2usage(1) if $options{'help'}; > # Set skip options based on check options > set_skip_options(); > >+# Set check options based on skip options >+set_check_options(); >+ > # Set all check options to 1 if none are provided, unless specified skip options > set_all_check_options_if_none_provided(); > >@@ -127,10 +130,30 @@ sub set_skip_options { > return %options; > } > >-# Set all check options to 1 if none are provided, considering skip options >+# Set check options based on skip options >+sub set_check_options { >+ >+ my @has_skip_option = grep { $options{$_} } grep { /^skip-/ } keys %options; >+ >+ #warn $has_skip_option;exit; >+ if (@has_skip_option) { >+ >+ # enable all check-* options >+ $options{$_} = 1 for grep { /^check-/ } keys %options; >+ >+ # disable the corresponding check-* for each active skip-* option >+ foreach my $key (@has_skip_option) { >+ my $check_key = $key; >+ $check_key =~ s/^skip-/check-/; >+ $options{$check_key} = 0 if exists $options{$check_key}; >+ } >+ } >+ return %options; >+} >+ >+# Set all check options to 1 if check-all are provided, considering skip options > sub set_all_check_options_if_none_provided { >- my $check_all_option_provided = grep { $options{$_} && $_ eq "check-all" } grep { /^check-/ } keys %options; >- if ($check_all_option_provided) { >+ if ( $options{'check-all'} ) { > foreach my $key ( keys %options ) { > if ( $key =~ /^check-/ ) { > my $skip_key = $key; >@@ -140,9 +163,11 @@ sub set_all_check_options_if_none_provided { > $options{$key} = 1 unless $options{$skip_key}; > } > } >- } elsif ( 0 == grep { $options{$_} && $_ ne "check-all" } grep { /^check-/ } keys %options ) { >- handle_invalid_options("No options selected"); >- die; >+ } else { >+ unless ( grep { $options{$_} && /^(check-|skip-)/ } keys %options ) { >+ handle_invalid_options("No options selected"); >+ die; >+ } > } > } > >-- >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 36027
:
161852
|
161953
|
161954
|
162162
|
162349
|
162351
|
162540
|
162546
|
163259
|
163956
|
166117
|
167766
|
167787
|
168953
|
168954
|
169228
|
169229
|
170847
|
170848
|
170849
|
173269
|
173270
|
173271
|
173556
|
177270
|
177283
|
177438
|
177439
|
177440
|
177441
|
177442
|
177443
|
177444
|
177849
|
177850
|
177851
|
177852
|
177853
|
177854
|
180257
|
180258
|
180259
|
180260
|
180261
|
180262
|
187299
|
187300
|
187301
|
187302
|
187303
|
187304
| 187320