aboutsummaryrefslogtreecommitdiff
path: root/Keywords/pkg_install.awk
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2014-06-20 21:03:02 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2014-06-20 21:03:02 +0000
commit7c7b6b6ef17a2b5d093e2ad54e6fca19506d10d9 (patch)
treed11c8e5df4b74ec08d45fd0d3db9c945b9a905e4 /Keywords/pkg_install.awk
parent5ed5af8e8c6b3b4ac9e44d70ee7165f8f00d6d50 (diff)
downloadports-7c7b6b6ef17a2b5d093e2ad54e6fca19506d10d9.tar.gz
ports-7c7b6b6ef17a2b5d093e2ad54e6fca19506d10d9.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
Notes
Notes: svn path=/head/; revision=358636
Diffstat (limited to 'Keywords/pkg_install.awk')
-rw-r--r--Keywords/pkg_install.awk12
1 files changed, 12 insertions, 0 deletions
diff --git a/Keywords/pkg_install.awk b/Keywords/pkg_install.awk
index 7f3d5903f358..7128dfb06f46 100644
--- a/Keywords/pkg_install.awk
+++ b/Keywords/pkg_install.awk
@@ -84,6 +84,18 @@ $1 == "@fontsdir" {
next
}
+$1 == "@dirrmtry" {
+ directory=substr($0, 11, length($0) - 10)
+ print "@comment begin " $0
+ if ($2 ~ /^\//) {
+ print "@unexec rmdir \"" directory "\" 2>/dev/null || true"
+ } else {
+ print "@unexec rmdir \"%D/" directory "\" 2>/dev/null || true"
+ }
+ print "@comment end " $0
+ next
+}
+
# Print everything else as-is
{
print $0