diff options
author | Sofian Brabez <sbz@FreeBSD.org> | 2012-09-27 13:52:53 +0000 |
---|---|---|
committer | Sofian Brabez <sbz@FreeBSD.org> | 2012-09-27 13:52:53 +0000 |
commit | f070977bbf3f4e8046a35d221d4a81e171ca52dc (patch) | |
tree | a4e966ffec775d21b7c573825a5c75e132951ab8 /lang/python | |
parent | c53371256db30ae522c60302ff42aa2a2597af5a (diff) | |
download | ports-f070977bbf3f4e8046a35d221d4a81e171ca52dc.tar.gz ports-f070977bbf3f4e8046a35d221d4a81e171ca52dc.zip |
Notes
Diffstat (limited to 'lang/python')
-rw-r--r-- | lang/python/Makefile | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/lang/python/Makefile b/lang/python/Makefile index a9d98dba9fef..33b66f9df5ea 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -25,15 +25,9 @@ do-install: # Major upgrade support PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade -PKG_WHICH_CMD= ${LOCALBASE}/sbin/pkg_which -XARGS_CMD= ${XARGS} -0 .if defined(USE_PORTMASTER) PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster -PORTUPGRADE_ARGS?= "" -PKG_WHICH_CMD= /usr/sbin/pkg_info -qW -JOBS= ${SYSCTL} -n kern.smp.cpus -XARGS_CMD= ${XARGS} -L 1 -0 -P $$(${JOBS}) .endif upgrade-site-packages: @@ -42,22 +36,21 @@ upgrade-site-packages: ${FALSE}; \ fi - @for ver in `echo ${_PYTHON_ALLBRANCHES}|${SED} 's/${PYTHON_VER}//'`; do \ - if [ -d ${PREFIX}/lib/python$$ver ]; then \ - UPD=`${FIND} ${PREFIX}/lib/python$$ver \ - -type f -print0 | \ - ${XARGS_CMD} ${PKG_WHICH_CMD} | \ - ${GREP} -Fv '?' | \ - ${EGREP} -v '^python2?[0-5]?-2' | \ - ${SORT} -u`; \ - if [ "$$UPD" ]; then \ - if [ -n ${PORTUPGRADE_ARGS} ]; then \ - ${PORTUPGRADE_CMD} ${PORTUPGRADE_ARGS} -f $$UPD; \ - else \ - ${PORTUPGRADE_CMD} -f $$UPD; \ - fi; \ - fi; \ + @GREP_ARGS="-q"; \ + for ver in `echo ${_PYTHON_ALLBRANCHES:C/${PYTHON_VER}//}`; do \ + GREP_ARGS="$${GREP_ARGS} -e lib/python$$ver"; \ + done; \ + UPD=""; \ + for pkg in `${PKG_INFO} -Ea`; do \ + ${PKG_INFO} -L $${pkg} | ${GREP} $${GREP_ARGS} && \ + UPD="$${UPD} $${pkg}"; \ + done; \ + if [ "$${UPD}" ]; then \ + if [ -n ${PORTUPGRADE_ARGS} ]; then \ + ${PORTUPGRADE_CMD} ${PORTUPGRADE_ARGS} -f $${UPD}; \ + else \ + ${PORTUPGRADE_CMD} -f $${UPD}; \ fi; \ - done \ + fi; \ .include <bsd.port.mk> |