Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jun 2018 09:26:31 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r471991 - head/Mk/Scripts
Message-ID:  <201806080926.w589QVic044402@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806080926.w589QVic044402>