Date: Fri, 27 Sep 2013 18:33:16 +0000 (UTC) From: Marcus von Appen <mva@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r328507 - head/Mk Message-ID: <201309271833.r8RIXGFI073695@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mva Date: Fri Sep 27 18:33:16 2013 New Revision: 328507 URL: http://svnweb.freebsd.org/changeset/ports/328507 Log: - Delete the whole directory hierarchy, not only directories containing files, when using PYDISTUTILS_AUTOPLIST. Spotted by: wg@ Modified: head/Mk/bsd.python.mk Modified: head/Mk/bsd.python.mk ============================================================================== --- head/Mk/bsd.python.mk Fri Sep 27 17:57:38 2013 (r328506) +++ head/Mk/bsd.python.mk Fri Sep 27 18:33:16 2013 (r328507) @@ -503,18 +503,27 @@ PYDISTUTILS_INSTALLARGS:= --record ${_PY ${PYDISTUTILS_INSTALLARGS} _RELSITELIBDIR= ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} +_RELLIBDIR= ${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} add-plist-post: add-plist-pymod add-plist-pymod: - { ${ECHO_CMD} "#mtree"; ${CAT} ${MTREE_FILE}; } | ${TAR} tf - | \ + @{ ${ECHO_CMD} "#mtree"; ${CAT} ${MTREE_FILE}; } | ${TAR} tf - | \ ${SED} '/^\.$$/d' > ${WRKDIR}/.localmtree - ${ECHO_CMD} "${_RELSITELIBDIR}" >> ${WRKDIR}/.localmtree - ${SED} 's|^${PREFIX}/||' ${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST} - ${SED} -e 's|^${PREFIX}/\(.*\)/\(.*\)|\1|' ${_PYTHONPKGLIST} | \ + @${ECHO_CMD} "${_RELSITELIBDIR}" >> ${WRKDIR}/.localmtree + @${ECHO_CMD} "${_RELLIBDIR}" >> ${WRKDIR}/.localmtree + @${SED} 's|^${PREFIX}/||' ${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST} + @${SED} -e 's|^${PREFIX}/\(.*\)/\(.*\)|\1|' ${_PYTHONPKGLIST} | \ + ${AWK} '{ num = split($$0, a, "/"); res=""; \ + for(i = 1; i <= num; ++i) { \ + if (i == 1) res = a[i]; \ + else res = res "/" a[i]; \ + print res; \ + } \ + }' | \ while read line; do \ ${GREP} -qw "^$${line}$$" ${WRKDIR}/.localmtree || { \ [ -n "$${line}" ] && \ - ${ECHO_CMD} "@unexec rmdir $${line} 2>/dev/null || true"; \ + ${ECHO_CMD} "@unexec rmdir \"%D/$${line}\" 2>/dev/null || true"; \ }; \ done | ${SORT} | uniq | ${SORT} -r >> ${TMPPLIST}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309271833.r8RIXGFI073695>