svn commit: r533339 - head/Keywords

Baptiste Daroussin bapt at FreeBSD.org
Wed Apr 29 14:33:55 UTC 2020


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 at 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


More information about the svn-ports-head mailing list