Add a QA check warning porters about non UCL pkg-message files.

Reviewed by:	adamw
Differential Revision:	https://reviews.freebsd.org/D21262
This commit is contained in:
Mathieu Arnold
2019-08-19 12:18:21 +00:00
parent b174453dcd
commit 55b249bab3
2 changed files with 16 additions and 1 deletions

View File

@@ -994,10 +994,24 @@ depends_blacklist()
return $rc
}
pkgmessage()
{
for message in ${PKGMESSAGES}; do
if [ -f "${message}" ]; then
if ! head -1 "${message}" | grep -q '^\['; then
warn "${message} not in UCL format, will be shown on initial install only."
warn "See https://www.freebsd.org/doc/en/books/porters-handbook/pkg-files.html#porting-message"
fi
fi
done
return 0
}
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo"
checks="$checks proxydeps sonames perlcore no_arch gemdeps gemfiledeps flavors"
checks="$checks license depends_blacklist"
checks="$checks license depends_blacklist pkgmessage"
ret=0
cd ${STAGEDIR} || exit 1

View File

@@ -1601,6 +1601,7 @@ QA_ENV+= STAGEDIR=${STAGEDIR} \
"STRIP=${STRIP}" \
TMPPLIST=${TMPPLIST} \
CURDIR='${.CURDIR}' \
PKGMESSAGES='${_PKGMESSAGES}' \
FLAVOR=${FLAVOR} \
FLAVORS='${FLAVORS}' \
BUNDLE_LIBS=${BUNDLE_LIBS} \