Hello community,

here is the log from the commit of package devscripts for openSUSE:Factory 
checked in at 2020-12-02 13:57:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/devscripts (Old)
 and      /work/SRC/openSUSE:Factory/.devscripts.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "devscripts"

Wed Dec  2 13:57:25 2020 rev:11 rq:851798 version:2.19.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/devscripts/devscripts.changes    2019-09-07 
12:35:01.945661263 +0200
+++ /work/SRC/openSUSE:Factory/.devscripts.new.5913/devscripts.changes  
2020-12-02 13:57:27.569752968 +0100
@@ -1,0 +2,5 @@
+Mon Nov 23 17:53:12 UTC 2020 - Martin Liška <[email protected]>
+
+- Add backport from master devscripts-checkbashisms-early-fail.patch.
+
+-------------------------------------------------------------------

New:
----
  devscripts-checkbashisms-early-fail.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ devscripts.spec ++++++
--- /var/tmp/diff_new_pack.Gfg4C7/_old  2020-12-02 13:57:28.105753533 +0100
+++ /var/tmp/diff_new_pack.Gfg4C7/_new  2020-12-02 13:57:28.109753538 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package devscripts
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -31,6 +31,7 @@
 Patch1:         devscripts-fix-python-install-layout.patch
 # PATCH-FEATURE-OPENSUSE devscripts-debcommit-hg16.patch -- Mercurial cannot 
commit empty, fix it.
 Patch2:         devscripts-debcommit-hg16.patch
+Patch3:         devscripts-checkbashisms-early-fail.patch
 BuildRequires:  bash-completion-devel
 BuildRequires:  docbook-xsl-stylesheets
 BuildRequires:  dpkg-devel >= 1.18.19
@@ -89,6 +90,7 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 make %{?_smp_mflags} V=1 \

++++++ devscripts-checkbashisms-early-fail.patch ++++++
diff --git a/scripts/checkbashisms.1 b/scripts/checkbashisms.1
index 6df5f3c7..1075408a 100644
--- a/scripts/checkbashisms.1
+++ b/scripts/checkbashisms.1
@@ -44,6 +44,9 @@ which may be ignored.
 For example, the use of "\fB$BASH_ENV\fR" may be preceded by checking
 whether "\fB$BASH\fR" is set.
 .TP
+.BR \-\-early-fail ", " \-e
+Exit right after a first error is seen.
+.TP
 .BR \-\-version ", " \-v
 Show version and copyright information.
 .SH "EXIT VALUES"
diff --git a/scripts/checkbashisms.bash_completion 
b/scripts/checkbashisms.bash_completion
index 4ce5b521..b0e30fdf 100644
--- a/scripts/checkbashisms.bash_completion
+++ b/scripts/checkbashisms.bash_completion
@@ -10,7 +10,7 @@ _checkbashisms()
     _init_completion || return
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $( compgen -W '--newline --posix --force --extra' -- 
"$cur" ) )
+        COMPREPLY=( $( compgen -W '--newline --posix --force --extra 
--early-fail' -- "$cur" ) )
     else
         COMPREPLY=( $( compgen -o filenames -f -- "$cur" ) )
     fi
diff --git a/scripts/checkbashisms.pl b/scripts/checkbashisms.pl
index 653ec1bb..568e2c33 100755
--- a/scripts/checkbashisms.pl
+++ b/scripts/checkbashisms.pl
@@ -30,7 +30,7 @@ sub init_hashes;
 (my $progname = $0) =~ s|.*/||;
 
 my $usage = <<"EOF";
-Usage: $progname [-n] [-f] [-x] script ...
+Usage: $progname [-n] [-f] [-x] [-e] script ...
    or: $progname --help
    or: $progname --version
 This script performs basic checks for the presence of bashisms
@@ -47,7 +47,7 @@ You are free to redistribute this code under the terms of the
 GNU General Public License, version 2, or (at your option) any later version.
 EOF
 
-my ($opt_echo, $opt_force, $opt_extra, $opt_posix);
+my ($opt_echo, $opt_force, $opt_extra, $opt_posix, $opt_early_fail);
 my ($opt_help, $opt_version);
 my @filenames;
 
@@ -62,12 +62,13 @@ if (scalar(@ARGV) == 0 && (-p STDIN or -f STDIN)) {
 $opt_help = 1 if int(@ARGV) == 0;
 
 GetOptions(
-    "help|h"    => \$opt_help,
-    "version|v" => \$opt_version,
-    "newline|n" => \$opt_echo,
-    "force|f"   => \$opt_force,
-    "extra|x"   => \$opt_extra,
-    "posix|p"   => \$opt_posix,
+    "help|h"       => \$opt_help,
+    "version|v"    => \$opt_version,
+    "newline|n"    => \$opt_echo,
+    "force|f"      => \$opt_force,
+    "extra|x"      => \$opt_extra,
+    "posix|p"      => \$opt_posix,
+    "early-fail|e" => \$opt_early_fail,
   )
   or die
 "Usage: $progname [options] filelist\nRun $progname --help for more details\n";
@@ -543,6 +544,9 @@ sub output_explanation {
         $issues = 1;
     } else {
         warn "possible bashism in $filename line $. ($explanation):\n$line\n";
+        if ($opt_early_fail) {
+            exit 1;
+        }
         $status |= 1;
     }
 }
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to