svn commit: r471991 - head/Mk/Scripts

Mathieu Arnold mat at FreeBSD.org
Fri Jun 8 09:26:39 UTC 2018


Author: mat
Date: Fri Jun  8 09:26:31 2018
New Revision: 471991
URL: https://svnweb.freebsd.org/changeset/ports/471991

Log:
  SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
  
  It's common to use A && B to run B when A is true, and A || C to run C
  when A is false.
  
  However, combining them into A && B || C is not the same as if A then B
  else C.
  
  In this case, if A is true but B is false, C will run.
  
  If an if clause is used instead, this problem is avoided.
  
  PR:             227109
  Submitted by:   mat
  Sponsored by:   Absolight

Modified:
  head/Mk/Scripts/qa.sh   (contents, props changed)

Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh	Fri Jun  8 09:26:28 2018	(r471990)
+++ head/Mk/Scripts/qa.sh	Fri Jun  8 09:26:31 2018	(r471991)
@@ -261,9 +261,10 @@ suidfiles() {
 libtool() {
 	if [ -z "${USESLIBTOOL}" ]; then
 		find ${STAGEDIR} -name '*.la' | while read f; do
-			grep -q 'libtool library' "${f}" &&
-				err ".la libraries found, port needs USES=libtool" &&
-				return 1 || true
+			if grep -q 'libtool library' "${f}"; then
+				err ".la libraries found, port needs USES=libtool"
+				return 1
+			fi
 		done
 		# The return above continues here.
 	fi


More information about the svn-ports-all mailing list