diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2019-03-18 15:59:13 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2019-03-18 15:59:13 +0000 |
commit | a29c880f740767bb74d2394de208798a7a5fa442 (patch) | |
tree | 56fdf694fde97bd3542ee7a43593d7288b58e8f8 /Mk/Scripts/qa.sh | |
parent | add78b450924f884ab171dce8672ba59d93f46c2 (diff) |
Notes
Diffstat (limited to 'Mk/Scripts/qa.sh')
-rw-r--r-- | Mk/Scripts/qa.sh | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh index 652a85d43dfc..a754a01ba269 100644 --- a/Mk/Scripts/qa.sh +++ b/Mk/Scripts/qa.sh @@ -925,10 +925,50 @@ license() return 0 } +# This is to prevent adding dependencies to meta ports that are only there to +# improve the end user experience. +depends_blacklist() +{ + local dep rc instead + + rc=0 + + for dep in ${UNIFIED_DEPENDS}; do + origin=$(expr "${dep}" : ".*:\([^@]*\)") + instead="" + + case "$origin" in + lang/python|lang/python2|lang/python3) + # lang/python depends on lang/pythonX, but it's + # ok, it is also in the blacklist. + if [ ${PKGORIGIN} != lang/python ]; then + instead="USES=python:xy with a specific version" + fi + ;; + lang/gcc) + instead="USE_GCC" + ;; + devel/llvm) + instead="a dependency on devel/llvm\${LLVM_DEFAULT}" + ;; + www/py-django) + instead="one of the www/py-djangoXYZ port" + ;; + esac + + if [ -n "${instead}" ]; then + err "$origin should not be depended upon. Instead, use $instead." + rc=1 + fi + done + + return $rc +} + 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" +checks="$checks license depends_blacklist" ret=0 cd ${STAGEDIR} || exit 1 |