Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2014 16:50:14 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350634 - head/Mk/Scripts
Message-ID:  <201404081650.s38GoEHg010008@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Tue Apr  8 16:50:13 2014
New Revision: 350634
URL: http://svnweb.freebsd.org/changeset/ports/350634
QAT: https://qat.redports.org/buildarchive/r350634/

Log:
  Rewrite the sharedmimeinfo qa check so that it doesn't produce a false
  positive on misc/shared-mime-info
  
  With help from:	bdrewery
  With hat:	portmgr

Modified:
  head/Mk/Scripts/qa.sh

Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh	Tue Apr  8 16:48:57 2014	(r350633)
+++ head/Mk/Scripts/qa.sh	Tue Apr  8 16:50:13 2014	(r350634)
@@ -114,11 +114,18 @@ desktopfileutils() {
 }
 
 sharedmimeinfo() {
-	if [ -z "${USESSHAREDMIMEINFO}" ]; then
-		find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null &&
+	local f found
+
+	found=0
+	for f in ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml; do
+		[ "${f}" = "${STAGEDIR}${PREFIX}/share/mime/packages/*.xml" ] && break #no matches
+		[ "${f}" = "${STAGEDIR}${PREFIX}/share/mime/packages/freedesktop.org.xml" ] && continue
+		found=1
+		break
+	done
+	if [ -z "${USESSHAREDMIMEINFO}" -a ${found} -eq 1 ]; then
 		warn "you need USES=shared-mime-info"
-	else
-		find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null ||
+	elif [ -n "${USESSHAREDMIMEINFO}" -a ${found} -eq 0 ]; then
 		warn "you may not need USES=shared-mime-info"
 	fi
 	return 0



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