diff options
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/qa.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh index 5e73c45336a3..172079809439 100644 --- a/Mk/Scripts/qa.sh +++ b/Mk/Scripts/qa.sh @@ -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 |