Date: Mon, 18 Mar 2019 15:59:13 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r496150 - head/Mk/Scripts Message-ID: <201903181559.x2IFxDZq025133@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Mon Mar 18 15:59:13 2019 New Revision: 496150 URL: https://svnweb.freebsd.org/changeset/ports/496150 Log: Add a blacklist of ports that other ports must not depend upon. Those ports are meta ports, and are only there to improve the user's experience, in which, if they want, say, python or gcc, they do not have to figure out what version they should be installing, they simply install python or gcc. Reviewed by: antoine Approved by: adamw Differential Revision: https://reviews.freebsd.org/D19562 Modified: head/Mk/Scripts/qa.sh (contents, props changed) Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Mon Mar 18 15:37:24 2019 (r496149) +++ head/Mk/Scripts/qa.sh Mon Mar 18 15:59:13 2019 (r496150) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903181559.x2IFxDZq025133>