diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2022-04-04 09:44:45 +0300 |
---|---|---|
committer | Michal Domonkos <mdomonko@redhat.com> | 2022-07-01 10:52:14 +0200 |
commit | 81c17fa4699f7fe6b480c4b5d71f784a50c8565b (patch) | |
tree | 43651039a5158e43ee8d419199fd615e6a0a3ef2 | |
parent | 94f325a82f5e7a50350c0be8b95538ad0d24e1d1 (diff) | |
download | rpm-81c17fa4699f7fe6b480c4b5d71f784a50c8565b.tar.gz |
Fix check-buildroot missing matches with grep >= 3.5
Since 3.5, grep emits the diagnostic "binary file matches" message
to stderr which causes the result file to be empty and build continuing
despite an obvious error being present.
We're not interested in the match itself, only whether there are files
with matches. Grep has a standard option for this (-l), use it.
Fixes: #1968
(cherry picked from commit 96de5c1f02e69a7ae37bcc8437451dfa35c87ae1)
-rwxr-xr-x | scripts/check-buildroot | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/check-buildroot b/scripts/check-buildroot index d69867b45..74c3b469b 100755 --- a/scripts/check-buildroot +++ b/scripts/check-buildroot @@ -29,7 +29,7 @@ NCPUS=${RPM_BUILD_NCPUS:-1} find "$RPM_BUILD_ROOT" \! \( \ -name '*.pyo' -o -name '*.pyc' -o -name '*.elc' -o -name '.packlist' \ \) -type f -print0 | \ - LANG=C xargs -0r -P$NCPUS -n16 grep -F "$RPM_BUILD_ROOT" >>$tmp + LANG=C xargs -0r -P$NCPUS -n16 grep -lF "$RPM_BUILD_ROOT" >>$tmp test -s "$tmp" && { cat "$tmp" |