From: Prarit Bhargava prarit@redhat.com
redhat/Makefile: Fix RHJOBS grep warning
Calculating RHJOBS results in the warning
grep: warning: stray \ before white space
Resolve this by using [ ] to detect a space in the regex.
Before fix:
Search for "before white space" in https://s3.amazonaws.com/arr-cki-prod-trusted-artifacts/trusted-artifacts/68...
After fix:
No "before white space" errors seen in https://s3.amazonaws.com/arr-cki-prod-trusted-artifacts/trusted-artifacts/69...
Also, confirming that RHJOBS works correctly after the fix,
[prarit@prarit kernel-ark]$ make -j13 dist-dump-variables | grep RHJOBS= RHJOBS=13 [prarit@prarit kernel-ark]$
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -80,7 +80,7 @@ ifndef DISTRO endif
ifndef RHJOBS - RHJOBS=$(shell j=$$(echo $(MAKEFLAGS) | grep -Eo "\ -j[0-9]*" | xargs ); \ + RHJOBS=$(shell j=$$(echo $(MAKEFLAGS) | grep -Eo "(^|[ ])-j[0-9]*" | xargs ); \ if [ -z "$${j}" ]; then \ echo "1"; \ else \
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2148
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2148#note_1176072...
Good catch. The reason I didn't see this is because MAKEFLAGS always started with a "w".
``` [prarit@prarit kernel-ark]$ make -j13 dist-dump-variables | grep MAKEFLAGS GNUMAKEFLAGS= MAKEFLAGS=w -j13 --jobserver-auth=3,4 ```
Pushed a new version and will wait for the result to confirm the change resolves the warning as well.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2148#note_1176121...
Yep, the result looks good. #fixed
kernel@lists.fedoraproject.org