summaryrefslogtreecommitdiff
path: root/x11/wrapper
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2002-04-11 11:56:55 +0000
committerPeter Pentchev <roam@FreeBSD.org>2002-04-11 11:56:55 +0000
commitc9aeee376d68ea366dc6605d3d154b3a72941a14 (patch)
treefa2ffc411353a0001bbc3ae5cc2c46463a670438 /x11/wrapper
parentDon't depend on specific Python version. (diff)
Fix package deinstallation: only move X.bck over X if the former exists.
Since pkg_deinstall(1) invokes the package deinstall script twice, at the second invocation X.bck is no longer there, and mv(1), even with the -f flag, returns a non-zero exit code. The shell executing the script propagates this exit code right back unto pkg_deinstall(1), which complains and aborts the package deinstallation. I wish I had not forgotten about this problem, so this could go in before DP1 was cut :( Approved by: no response from trevor@, the port maintainer
Notes
Notes: svn path=/head/; revision=57571
Diffstat (limited to 'x11/wrapper')
-rw-r--r--x11/wrapper/Makefile2
-rw-r--r--x11/wrapper/pkg-deinstall4
2 files changed, 4 insertions, 2 deletions
diff --git a/x11/wrapper/Makefile b/x11/wrapper/Makefile
index 90082df81bb8..713cadea2851 100644
--- a/x11/wrapper/Makefile
+++ b/x11/wrapper/Makefile
@@ -7,7 +7,7 @@
PORTNAME= wrapper
PORTVERSION= 1.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11
MAINTAINER= trevor@FreeBSD.org
diff --git a/x11/wrapper/pkg-deinstall b/x11/wrapper/pkg-deinstall
index c6760606424c..7b96fa96538b 100644
--- a/x11/wrapper/pkg-deinstall
+++ b/x11/wrapper/pkg-deinstall
@@ -1,2 +1,4 @@
#!/bin/sh
-mv -f ${PKG_PREFIX}/bin/X.bck ${PKG_PREFIX}/bin/X
+if [ -e ${PKG_PREFIX}/bin/X.bck ]; then
+ mv ${PKG_PREFIX}/bin/X.bck ${PKG_PREFIX}/bin/X
+fi