diff options
author | Antoine Brodin <antoine@FreeBSD.org> | 2013-10-10 17:09:33 +0000 |
---|---|---|
committer | Antoine Brodin <antoine@FreeBSD.org> | 2013-10-10 17:09:33 +0000 |
commit | 0a9a0a511ff43ba4e2b3475b62570f9ced429651 (patch) | |
tree | 0c949085419182faa444c8e311b7657704285513 /Mk/Scripts/qa.sh | |
parent | Update to 1.4.1. (diff) |
Add two QA tests for staged ports:
- check for desktop files handling MIME types
- check for share MIME-Info database
Approved by: portmgr (bapt)
Notes
Notes:
svn path=/head/; revision=330020
Diffstat (limited to 'Mk/Scripts/qa.sh')
-rw-r--r-- | Mk/Scripts/qa.sh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh index c9a3915bc9f3..a8faa6e6213b 100644 --- a/Mk/Scripts/qa.sh +++ b/Mk/Scripts/qa.sh @@ -71,7 +71,27 @@ stripped() { done } -checks="shebang symlinks paths stripped" +desktopfileutils() { + if [ -z "${USESDESKTOPFILEUTILS}" ]; then + grep -q MimeType= ${STAGEDIR}${PREFIX}/share/applications/*.desktop 2>/dev/null && + warn "you need USES=desktop-file-utils" + else + grep -q MimeType= ${STAGEDIR}${PREFIX}/share/applications/*.desktop 2>/dev/null || + warn "you may not need USES=desktop-file-utils" + fi +} + +sharedmimeinfo() { + if [ -z "${USESSHAREDMIMEINFO}" ]; then + find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null && + warn "you need USES=shared-mime-info" + else + find ${STAGEDIR}${PREFIX}/share/mime/packages/*.xml ! -name "freedesktop\.org\.xml" -quit 2>/dev/null || + warn "you may not need USES=shared-mime-info" + fi +} + +checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo" ret=0 cd ${STAGEDIR} |