mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 09:19:15 -04:00
Mk/Scripts/qa.sh: Turn off pipefail when piping to grep -q
The pipeline readelf -d "${dep_file}" | grep -q SONAME can fail because grep -q closes the output early resulting sigpipe being sent to readelf. Other possible solutions are to turn off pipefail for the file or remove the -q grep argument. Credit to ashish@ for the detective work to discover the root cause of this. Differential Revision: https://reviews.freebsd.org/D31211 Reviewed by: emaste Approved by: bapt (portmgr) mat (portmgr)
This commit is contained in:
parent
8e05a6e24d
commit
6ff48ecff7
1 changed files with 4 additions and 0 deletions
|
@ -663,9 +663,13 @@ proxydeps() {
|
|||
|
||||
# Check that the .so we need has a SONAME
|
||||
if [ "${dep_file_pkg}" != "${PKGORIGIN}" ]; then
|
||||
# When grep -q finds a match it will close the pipe immediately.
|
||||
# This may cause the test to fail when pipefail is turned on.
|
||||
set +o pipefail
|
||||
if ! readelf -d "${dep_file}" | grep -q SONAME; then
|
||||
err "${file} is linked to ${dep_file} which does not have a SONAME. ${dep_file_pkg} needs to be fixed."
|
||||
fi
|
||||
set -o pipefail
|
||||
fi
|
||||
|
||||
# If we don't already depend on it, and we don't provide it
|
||||
|
|
Loading…
Add table
Reference in a new issue