svn commit: r552943 - head/Keywords
Baptiste Daroussin
bapt at FreeBSD.org
Thu Oct 22 08:20:08 UTC 2020
Author: bapt
Date: Thu Oct 22 08:20:07 2020
New Revision: 552943
URL: https://svnweb.freebsd.org/changeset/ports/552943
Log:
Add new keyword rmempty
The goal is to replace all the hand crafted @*unexec test -s XXX && rm by a proper
keyword.
this keyword is also rootdir compliant
Reviewed by: manu, mat
Approved by: portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D26633
Added:
head/Keywords/rmempty.ucl (contents, props changed)
Added: head/Keywords/rmempty.ucl
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/Keywords/rmempty.ucl Thu Oct 22 08:20:07 2020 (r552943)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+#
+# MAINTAINER: portmgr at FreeBSD.org
+actions: []
+pre-deinstall-lua: <<EOD
+ file = pkg.prefixed_path("%@")
+ local st = pkg.stat(file)
+ if st and st.type == "reg" and st.size == 0 then
+ os.remove(file)
+ end
+EOD
More information about the svn-ports-head
mailing list