Index: svnadmin/hooks/scripts/stage-only.sh =================================================================== --- svnadmin/hooks/scripts/stage-only.sh (revision 499995) +++ svnadmin/hooks/scripts/stage-only.sh (revision 499996) @@ -1,58 +1,65 @@ #!/bin/sh # $FreeBSD$ REPO=$1 TXN=$2 OIFS=${IFS} IFS=$'\n' svnlook log -t "${TXN}" "${REPO}" | grep -q portmgr && exit 0 for line in $(svnlook changed -t $TXN $REPO) ; do IFS=${OIFS} set -- $line type=$1 fpath=$2 case $type in [^AU]*) continue;; esac case $fpath in head/*/*/Makefile*) if svnlook cat -t ${TXN} ${REPO} $fpath | grep -q "^NO_STAGE" ; then echo "Do not commit ports with NO_STAGE" 1>&2 echo "The port must be converted to support staging before it can be updated or added. See" 1>&2 echo "https://wiki.freebsd.org/ports/StageDir" 1>&2 exit 1 fi if svnlook cat -t ${TXN} ${REPO} $fpath | grep -qE "if.*def.*(NOPORTDOCS|NOPORTEXAMPLES)" ; then echo "Do not commit ports with NOPORTDOCS or NOPORTEXAMPLES." 1>&2 echo "The port must be converted to proper OPTIONS. See" 1>&2 echo "http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-options.html" 1>&2 exit 1 fi if svnlook cat -t ${TXN} ${REPO} $fpath | grep -q "if.*def.*NOPORTDATA" ; then echo "Do not commit ports with NOPORTDATA." 1>&2 echo "NOPORTDATA is nonsense as a variable affecting all ports." 1>&2 exit 1 fi ;; head/*/*/pkg-plist*) if svnlook cat -t ${TXN} ${REPO} $fpath | grep -q "%%PORTDATA%%" ; then echo "Do not commit ports with %%PORTDATA%%." 1>&2 echo "NOPORTDATA is nonsense as a variable affecting all ports." 1>&2 exit 1 fi ;; + head/*/*/pkg-plist*) + if svnlook cat -t ${TXN} ${REPO} $fpath | grep -q "%%PYTHON_PYOEXTENSION%%" ; then + echo "Do not commit ports with %%PYTHON_PYOEXTENSION%%." 1>&2 + echo "Use either pyo for python 2.7 ports or opt-1.pyc for python 3.5+ ports." 1>&2 + exit 1 + fi + ;; head/*/*/distinfo*) if ! svnlook cat -t ${TXN} ${REPO} $fpath | grep -q '^TIMESTAMP = [0-9]*$' ; then echo "Do not commit ports without TIMESTAMP in their distinfo files." 1>&2 echo "Rerun make makesum to add it." 1>&2 exit 1 fi ;; esac done if svnlook diff -t ${TXN} ${REPO} | grep -q "^+FLAVORS" ; then echo "Do not commit a port with FLAVORS without first" 1>&2 echo "getting approval from portmgr." 1>&2 exit 1 fi