diff options
author | roam <roam@FreeBSD.org> | 2002-04-11 19:56:55 +0800 |
---|---|---|
committer | roam <roam@FreeBSD.org> | 2002-04-11 19:56:55 +0800 |
commit | 52dc5cecae3ad26772df5740717e07a24aad78c1 (patch) | |
tree | 26d2242a6ca2655d217a48718b4dce03b324778a /x11/wrapper | |
parent | 39af90193d6f0a554a10512b33c9bc8cdd367edd (diff) | |
download | freebsd-ports-gnome-52dc5cecae3ad26772df5740717e07a24aad78c1.tar.gz freebsd-ports-gnome-52dc5cecae3ad26772df5740717e07a24aad78c1.tar.zst freebsd-ports-gnome-52dc5cecae3ad26772df5740717e07a24aad78c1.zip |
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
Diffstat (limited to 'x11/wrapper')
-rw-r--r-- | x11/wrapper/Makefile | 2 | ||||
-rw-r--r-- | x11/wrapper/pkg-deinstall | 4 |
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 |