Date: Wed, 29 Apr 2020 14:33:55 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r533339 - head/Keywords Message-ID: <202004291433.03TEXt9U050534@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Wed Apr 29 14:33:55 2020 New Revision: 533339 URL: https://svnweb.freebsd.org/changeset/ports/533339 Log: Replace @rmtry shell implementation with a lua implementation This way @rmtry is now rootdir friendly It also allows cross installation (arm rootdir on amd64 host for example) Reviewed by: pormtgr (mat) Differential Revision: https://reviews.freebsd.org/D23618 Modified: head/Keywords/rmtry.ucl Modified: head/Keywords/rmtry.ucl ============================================================================== --- head/Keywords/rmtry.ucl Wed Apr 29 14:06:53 2020 (r533338) +++ head/Keywords/rmtry.ucl Wed Apr 29 14:33:55 2020 (r533339) @@ -2,10 +2,8 @@ # # MAINTAINER: portmgr@FreeBSD.org actions: [] -post-deinstall: <<EOD - case "%@" in - /*) f="%@" ;; - *) f="%D/%@" ;; - esac - /bin/rm -f ${PKG_ROOTDIR}/$f 2>/dev/null || /usr/bin/true +post-deinstall-lua: <<EOD + file = pkg.prefixed_path("%@") + -- ignore the return value and the error + ret, err = os.remove(file) EOD
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004291433.03TEXt9U050534>