svn commit: r456908 - in head/Mk: Scripts Uses
Dmitry Marakasov
amdmi3 at FreeBSD.org
Thu Dec 21 13:27:52 UTC 2017
Author: amdmi3
Date: Thu Dec 21 13:27:51 2017
New Revision: 456908
URL: https://svnweb.freebsd.org/changeset/ports/456908
Log:
Report (in q/a) and fix (in shebangfix) python[23] shebangs
Currently, only python shebangs (e.g. /bin/python, /usr/local/bin/python,
/usr/bin/env python etc.) are reported by stage Q/A and fixed by
USES=shebangfix. We need to do the same for python[23] as well.
Before the problem was not noticeable since many ports had e.g.
USES=python:2, which added a dependency on python2 metaport, however
that's going to switch to USES=python:2.7, and neither it, nor more
widely used USES=python adds a dependency on metaports, so there's
very high probability that python[23] links are not available.
Approved by: portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D13571
Modified:
head/Mk/Scripts/qa.sh
head/Mk/Uses/shebangfix.mk
Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh Thu Dec 21 13:21:13 2017 (r456907)
+++ head/Mk/Scripts/qa.sh Thu Dec 21 13:27:51 2017 (r456908)
@@ -48,7 +48,7 @@ shebangonefile() {
/bin/rc)
# whitelist some interpreters
;;
- ${LOCALBASE}/bin/python|${PREFIX}/bin/python)
+ ${LOCALBASE}/bin/python|${PREFIX}/bin/python|${LOCALBASE}/bin/python2|${PREFIX}/bin/python2|${LOCALBASE}/bin/python3|${PREFIX}/bin/python3)
badinterp="${interp}"
;;
${LINUXBASE}/*) ;;
@@ -69,7 +69,7 @@ shebangonefile() {
/usr/bin/env)
interparg=$(sed -n -e '1s/^#![[:space:]]*[^[:space:]]*[[:space:]]*\([^[:space:]]*\).*/\1/p;2q' "${f}")
case "${interparg}" in
- python)
+ python|python2|python3)
badinterp="${interp} ${interparg}"
;;
esac
Modified: head/Mk/Uses/shebangfix.mk
==============================================================================
--- head/Mk/Uses/shebangfix.mk Thu Dec 21 13:21:13 2017 (r456907)
+++ head/Mk/Uses/shebangfix.mk Thu Dec 21 13:27:51 2017 (r456908)
@@ -65,6 +65,13 @@ ${lang}_OLD_CMD+= /usr/bin/${lang}
${lang}_OLD_CMD+= /usr/local/bin/${lang}
.endfor
+.for pyver in 2 3
+python_OLD_CMD+= "/usr/bin/env python${pyver}"
+python_OLD_CMD+= /bin/python${pyver}
+python_OLD_CMD+= /usr/bin/python${pyver}
+python_OLD_CMD+= /usr/local/bin/python${pyver}
+.endfor
+
.for lang in ${SHEBANG_LANG}
. if !defined(${lang}_CMD)
IGNORE+= missing definition for ${lang}_CMD
More information about the svn-ports-all
mailing list