Package: blhc
Version: 0.15-1
Severity: normal
Tags: patch
blhc reports cargo's "Compiling" line for a crate that is not at the
top of the source tree as NONVERBOSE BUILD, although cargo runs with -v
and the full rustc command follows it. The 0.15 fix for
https://bugs.debian.org/1037521
accepts "(/<<PKGBUILDDIR>>)" and "(/builds/...)", but not a
subdirectory of <<PKGBUILDDIR>> or the /build/package/package path
that Salsa CI uses now.
Attached log, run with blhc --debian:
NONVERBOSE BUILD: Compiling foo v0.1.0 (/build/package/package/rust/foo)
NONVERBOSE BUILD: Compiling bar v0.1.0 (/<<PKGBUILDDIR>>/rust/bar)
The baz line, "(/<<PKGBUILDDIR>>)", is accepted.
This makes the Salsa CI blhc job fail for packages with a cargo
workspace, for example:
https://salsa.debian.org/mendezr/node-rollup/-/jobs/10657970
librsvg has the same failure and sets allow_failure on the job:
https://salsa.debian.org/gnome-team/librsvg/-/blob/debian/latest/debian/salsa-ci.yml
The attached patch accepts a path below <<PKGBUILDDIR>> and paths below
/build/ as well as /builds/. With it, the attached log and the node-rollup
build log give no output and exit 0, and "prove t/" still passes all
248 tests. It applies to master (5075a5c).
--- a/bin/blhc
+++ b/bin/blhc
@@ -572,7 +572,7 @@
return 0 if $line =~ /^\s*[Cc]ompiling catalog \S+\.po\b/;
return 0 if $line =~ /^\s*[Cc]ompiling \S+\.mo\b/;
# cargo build
- return 0 if $cargo and $line =~ m{^\s*Compiling\s+\S+\s+v\S+(?:\s+\(/(?:<<PKGBUILDDIR>>|builds/\S+)\))?$};
+ return 0 if $cargo and $line =~ m{^\s*Compiling\s+\S+\s+v\S+(?:\s+\(/(?:<<PKGBUILDDIR>>(?:/\S+)?|builds?/\S+)\))?$};
# "Compiling" with no file name.
if ($line =~ /^\s*[Cc]ompiling\s+(.+?)(?:\.\.\.)?$/) {
# $file_extension_regex may need spaces around the filename.
Filtered Build-Depends: debhelper-compat (= 13), cargo, rustc
dpkg-buildpackage: info: source package foo
dpkg-buildpackage: info: host architecture amd64
Compiling foo v0.1.0 (/build/package/package/rust/foo)
Running `rustc --crate-name foo --edition=2021 rust/foo/src/lib.rs
--crate-type lib`
Compiling bar v0.1.0 (/<<PKGBUILDDIR>>/rust/bar)
Running `rustc --crate-name bar --edition=2021 rust/bar/src/lib.rs
--crate-type lib`
Compiling baz v0.1.0 (/<<PKGBUILDDIR>>)
Running `rustc --crate-name baz --edition=2021 src/lib.rs --crate-type lib`