Re: [OS-BUILD PATCH] redhat/Makefile: Fix RHJOBS grep warning

2022-11-16 Thread Herton R. Krzesinski (via Email Bridge)
From: Herton R. Krzesinski on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2148#note_1174863504

So there is a problem in this expression I think, but it was already an
existing problem before this change.

If you have eg.: ```MAKEFLAGS="-j45"```, be at the beginning or -j being the
only option in the MAKEFLAGS, the expression will not match.

I think the expression need to be changed to: ```grep -Eo "(^|[ ])-j[0-9]*"```
So it matches either at the beginning, or as an option in the middle of other
options with the space.
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH] redhat/Makefile: Fix RHJOBS grep warning

2022-11-14 Thread Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava 

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/688747365/merge/3320666485/artifacts/build.log

After fix:

No "before white space" errors seen in 
https://s3.amazonaws.com/arr-cki-prod-trusted-artifacts/trusted-artifacts/694379019/merge/3320742570/artifacts/build.log

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 

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
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH] redhat/Makefile: Fix RHJOBS grep warning

2022-11-14 Thread Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava 

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/688747365/merge/3320666485/artifacts/build.log

After fix:

No "before white space" errors seen in 
https://s3.amazonaws.com/arr-cki-prod-trusted-artifacts/trusted-artifacts/694379019/merge/3320742570/artifacts/build.log

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 

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
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue