diff options
author | antoine <antoine@FreeBSD.org> | 2014-06-21 05:03:02 +0800 |
---|---|---|
committer | antoine <antoine@FreeBSD.org> | 2014-06-21 05:03:02 +0800 |
commit | 5e74345fca6f21cfdee638052fa97cf13650e54a (patch) | |
tree | d11c8e5df4b74ec08d45fd0d3db9c945b9a905e4 /Mk | |
parent | 54e1a2058f37e6b7983496165fba993a91510413 (diff) | |
download | freebsd-ports-gnome-5e74345fca6f21cfdee638052fa97cf13650e54a.tar.gz freebsd-ports-gnome-5e74345fca6f21cfdee638052fa97cf13650e54a.tar.zst freebsd-ports-gnome-5e74345fca6f21cfdee638052fa97cf13650e54a.zip |
Make @dirrmtry handling in pkg_install closer to what pkg does
Original patch: bapt
Phabric: D215
Exp-run: self, less orphans/leftovers with pkg_install with patch than without
and no new failures with pkg
With hat: portmgr
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 5 | ||||
-rw-r--r-- | Mk/bsd.python.mk | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 9d6e5c8765a9..7c35083336b1 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1586,8 +1586,7 @@ SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \ PLIST_SUB_SED_MIN?= 2 PLIST_SUB_SED?= ${PLIST_SUB:C/.*=.{1,${PLIST_SUB_SED_MIN}}$//g:NEXTRACT_SUFX=*:NOSREL=*:NLIB32DIR=*:NPREFIX=*:NLOCALBASE=*:N*="":N*="@comment*:C/([^=]*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\./\\./g} -PLIST_REINPLACE+= dirrmtry stopdaemon rmtry -PLIST_REINPLACE_DIRRMTRY=s!^@dirrmtry \(.*\)!@unexec rmdir "%D/\1" 2>/dev/null || true! +PLIST_REINPLACE+= stopdaemon rmtry PLIST_REINPLACE_RMTRY=s!^@rmtry \(.*\)!@unexec rm -f %D/\1 2>/dev/null || true! PLIST_REINPLACE_STOPDAEMON=s!^@stopdaemon \(.*\)!@unexec %D/etc/rc.d/\1 forcestop 2>/dev/null || true! @@ -5742,7 +5741,7 @@ add-plist-info: .if (${PREFIX} != "/usr") @${ECHO_CMD} "@unexec if [ -f %D/${INFO_PATH}/dir ]; then if sed -e '1,/Menu:/d' %D/${INFO_PATH}/dir | grep -q '^[*] '; then true; else rm %D/${INFO_PATH}/dir; fi; fi" >> ${TMPPLIST} .if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE}) - @${ECHO_CMD} "@unexec rmdir %D/${INFO_PATH} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@dirrmtry ${INFO_PATH}" >> ${TMPPLIST} .endif .endif .endif diff --git a/Mk/bsd.python.mk b/Mk/bsd.python.mk index 54438cd29749..14e214cb92f9 100644 --- a/Mk/bsd.python.mk +++ b/Mk/bsd.python.mk @@ -580,7 +580,7 @@ add-plist-egginfo: ${LS} ${PYDISTUTILS_EGGINFODIR}/${egginfo} | while read f; do \ ${ECHO_CMD} ${PYDISTUTILS_EGGINFODIR:S;^${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}/$${f} >> ${TMPPLIST}; \ done; \ - ${ECHO_CMD} "@unexec rmdir \"%D/${PYDISTUTILS_EGGINFODIR:S;${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}\" 2>/dev/null || true" >> ${TMPPLIST}; \ + ${ECHO_CMD} "@dirrmtry ${PYDISTUTILS_EGGINFODIR:S;${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}" >> ${TMPPLIST}; \ fi; . endfor .else @@ -613,11 +613,13 @@ add-plist-pymod: while read line; do \ ${GREP} -qw "^$${line}$$" ${WRKDIR}/.localmtree || { \ [ -n "$${line}" ] && \ - ${ECHO_CMD} "@unexec rmdir \"%D/$${line}\" 2>/dev/null || true"; \ + ${ECHO_CMD} "@dirrmtry $${line}"; \ }; \ done | ${SORT} | uniq | ${SORT} -r >> ${TMPPLIST} - @${ECHO_CMD} "@unexec rmdir \"%D/${PYTHON_SITELIBDIR:S;${PYTHONBASE}/;;}\" 2>/dev/null || true" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec rmdir \"%D/${PYTHON_LIBDIR:S;${PYTHONBASE}/;;}\" 2>/dev/null || true" >> ${TMPPLIST} +.if ${PREFIX} != ${LOCALBASE} + @${ECHO_CMD} "@dirrmtry ${PYTHON_SITELIBDIR:S;${PYTHONBASE}/;;}" >> ${TMPPLIST} + @${ECHO_CMD} "@dirrmtry ${PYTHON_LIBDIR:S;${PYTHONBASE}/;;}" >> ${TMPPLIST} +.endif .else .if ${PYTHON_REL} >= 320 && defined(PYTHON_PY3K_PLIST_HACK) |