summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-04-04 09:44:45 +0300
committerPanu Matilainen <pmatilai@redhat.com>2022-04-04 09:51:47 +0300
commit96de5c1f02e69a7ae37bcc8437451dfa35c87ae1 (patch)
treebb574faa013186236ea5cde06ff9d2e68667dc08
parent7f21b843d3c2f3f12864eb702cd7112cba02a674 (diff)
downloadrpm-96de5c1f02e69a7ae37bcc8437451dfa35c87ae1.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
-rwxr-xr-xscripts/check-buildroot2
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"