X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bin%2Fblhc;h=b45439ca9e533a7e01fbb2bc8759d5be8571d29e;hb=b12aec7229ebf8aa903aac01f66cab2d061b0a01;hp=c77a16cedddc3c91333098f9a96a4104abdaae6a;hpb=e44dbcfa8487a008098ae1f37123b9cf363fea8f;p=blhc%2Fblhc.git diff --git a/bin/blhc b/bin/blhc index c77a16c..b45439c 100755 --- a/bin/blhc +++ b/bin/blhc @@ -442,6 +442,8 @@ sub is_non_verbose_build { # C++ compiler setting. return 0 if $line =~ /^\s*C\+\+.+?:\s+(?:yes|no)\s*$/; return 0 if $line =~ /^\s*C\+\+ Library: stdc\+\+$/; + # "Compiling" non binary files. + return 0 if $line =~ /^\s*Compiling \S+\.(?:py|el)['"]?(?:\.\.\.)?$/; # "Compiling" with no file name. if ($line =~ /^\s*[Cc]ompiling\s+(.+?)(?:\.\.\.)?$/) { # $file_extension_regex may need spaces around the filename. @@ -773,6 +775,7 @@ foreach my $file (@ARGV) { my $continuation = 0; my $complete_line = undef; + my $non_verbose; while (my $line = <$fh>) { # And stop at the end of the build log. Package details (reported by # the buildd logs) are not important for us. This also prevents false @@ -780,6 +783,10 @@ foreach my $file (@ARGV) { last if index($line, 'Build finished at ') == 0 and $line =~ /^Build finished at \d{8}-\d{4}$/; + if (not $continuation) { + $non_verbose = 0; + } + # Detect architecture automatically unless overridden. if (not $arch and index($line, 'dpkg-buildpackage: host architecture ') == 0) { @@ -809,7 +816,7 @@ foreach my $file (@ARGV) { } # Check if this line indicates a non verbose build. - my $non_verbose = is_non_verbose_build($line); + $non_verbose |= is_non_verbose_build($line); # One line may contain multiple commands (";"). Treat each one as # single line. parse_line() is slow, only use it when necessary.