]> ruderich.org/simon Gitweb - blhc/blhc.git/commitdiff
Use proper look back for non-verbose detection for DEB_BUILD_OPTIONS=parallel
authorSimon Ruderich <simon@ruderich.org>
Thu, 1 Mar 2018 09:45:32 +0000 (10:45 +0100)
committerSimon Ruderich <simon@ruderich.org>
Thu, 1 Mar 2018 09:45:32 +0000 (10:45 +0100)
MANIFEST
NEWS
bin/blhc
t/logs/parallel [new file with mode: 0644]
t/tests.t

index 09932f45dd9f85f5bd09ca77e657423178839ecd..590b4161ffe379ede23212a8a0ddaf49acf443a1 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -61,6 +61,7 @@ t/logs/ignore-flag-ldflags
 t/logs/ignore-line
 t/logs/libtool
 t/logs/make
 t/logs/ignore-line
 t/logs/libtool
 t/logs/make
+t/logs/parallel
 t/logs/qt4
 t/logs/verbose-build
 t/tests.t
 t/logs/qt4
 t/logs/verbose-build
 t/tests.t
diff --git a/NEWS b/NEWS
index 798589eaf851324fd79a298c6b85eeefdf2b5978..79787a9974de240f636d1950584c85820c5d2193 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ Version 0.XX
   detect if the compiler applied PIE internally (c.f. Debian Bug 845339).
 - Add --line-numbers command line option
 - Sync architecture specific hardening support with dpkg 1.19.0.5.
   detect if the compiler applied PIE internally (c.f. Debian Bug 845339).
 - Add --line-numbers command line option
 - Sync architecture specific hardening support with dpkg 1.19.0.5.
+- Use proper look back for non-verbose detection if DEB_BUILD_OPTIONS=parallel
+  is present. Previously it was too small causing false-positives if the
+  option was detected.
 
 
 Version 0.07
 
 
 Version 0.07
index b37bf6ee30d8605ce35903fd79eb488b4b03491e..8297b7d6993c1465cb2795951fde8225752448c1 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -872,7 +872,7 @@ foreach my $file (@ARGV) {
 
         # This flags is not always available, but if it is use it.
         if ($line =~ /^DEB_BUILD_OPTIONS=.*\bparallel=(\d+)/) {
 
         # This flags is not always available, but if it is use it.
         if ($line =~ /^DEB_BUILD_OPTIONS=.*\bparallel=(\d+)/) {
-            $parallel = $1;
+            $parallel = $1 * 2;
         }
 
         # We skip over unimportant lines at the beginning of the log to
         }
 
         # We skip over unimportant lines at the beginning of the log to
diff --git a/t/logs/parallel b/t/logs/parallel
new file mode 100644 (file)
index 0000000..ad30895
--- /dev/null
@@ -0,0 +1,11 @@
+DEB_BUILD_OPTIONS=parallel=2
+
+dpkg-buildpackage: source package test
+
+[  3%] Building C object fec/CMakeFiles/fec.dir/encode_rs_char.c.o
+[  6%] Building C object fec/CMakeFiles/fec.dir/decode_rs_char.c.o
+cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnux32/fec && /usr/bin/cc   -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wall -Wno-unused -o CMakeFiles/fec.dir/decode_rs_char.c.o   -c /<<PKGBUILDDIR>>/fec/decode_rs_char.c
+cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnux32/fec && /usr/bin/cc   -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wall -Wno-unused -o CMakeFiles/fec.dir/encode_rs_char.c.o   -c /<<PKGBUILDDIR>>/fec/encode_rs_char.c
+[  9%] Building C object fec/CMakeFiles/fec.dir/init_rs_char.c.o
+cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnux32/fec && /usr/bin/cc   -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wall -Wno-unused -o CMakeFiles/fec.dir/init_rs_char.c.o   -c /<<PKGBUILDDIR>>/fec/init_rs_char.c
+[ 12%] Linking C static library libfec.a
index 3aa79b139015bc972919cc44d182777c2b44198e..4eabdcfd3eadd8fcc3ca7d4aeea364896f0dec2e 100644 (file)
--- a/t/tests.t
+++ b/t/tests.t
@@ -19,7 +19,7 @@
 use strict;
 use warnings;
 
 use strict;
 use warnings;
 
-use Test::More tests => 232;
+use Test::More tests => 234;
 
 
 sub is_blhc {
 
 
 sub is_blhc {
@@ -635,6 +635,8 @@ NONVERBOSE BUILD: Compiling test.c \     gcc test.c
 NONVERBOSE BUILD: [  3%] Building CXX object scribus/text/CMakeFiles/scribus_text_lib.dir/frect.cpp.o
 ';
 
 NONVERBOSE BUILD: [  3%] Building CXX object scribus/text/CMakeFiles/scribus_text_lib.dir/frect.cpp.o
 ';
 
+is_blhc 'parallel', '', 0, '';
+
 
 # handle debug builds
 
 
 # handle debug builds