aboutsummaryrefslogtreecommitdiff
path: root/Keywords
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2020-04-29 14:33:55 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2020-04-29 14:33:55 +0000
commit6feec0a3372f6070c1e02f72cf92ffd06b48ec0f (patch)
treeaf8d43acf26226cc7567d4c49600edce5cf32384 /Keywords
parent2f651af0ac70225cd991a10f99238f1efcd9fb35 (diff)
downloadports-6feec0a3372f6070c1e02f72cf92ffd06b48ec0f.tar.gz
ports-6feec0a3372f6070c1e02f72cf92ffd06b48ec0f.zip
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
Notes
Notes: svn path=/head/; revision=533339
Diffstat (limited to 'Keywords')
-rw-r--r--Keywords/rmtry.ucl10
1 files changed, 4 insertions, 6 deletions
diff --git a/Keywords/rmtry.ucl b/Keywords/rmtry.ucl
index 93b27db4449c..9785ffd697eb 100644
--- a/Keywords/rmtry.ucl
+++ b/Keywords/rmtry.ucl
@@ -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