diff options
author | marino <marino@FreeBSD.org> | 2014-07-09 01:26:36 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2014-07-09 01:26:36 +0800 |
commit | dc8eca38483eaf41f9bcd38df7485b3d653203af (patch) | |
tree | 2737e6ba9264d2988826c310fe806a21ca646058 /games | |
parent | e00d90951836da018c73b62c48f28532f7a26a76 (diff) | |
download | freebsd-ports-gnome-dc8eca38483eaf41f9bcd38df7485b3d653203af.tar.gz freebsd-ports-gnome-dc8eca38483eaf41f9bcd38df7485b3d653203af.tar.zst freebsd-ports-gnome-dc8eca38483eaf41f9bcd38df7485b3d653203af.zip |
games/atomix: Fix deinstallation issue involving scores file
The scheme used to leave a non-zero length scores file alone during
deinstallation no longer works under stage. The scheme used a
post-install script to add the scores directory and initial file, but
then tried to remove it using the pkg-plist.
Apparently these need to be matched, which means either the post-install
script is matched with a post-deinstall script, or the creation of the
scores file be done in the pkg-list with @exec. As the logic is slightly
complex, it was easier to solve with a pkg-deinstall script.
There were two unnecessary @dirrmtry lines as well which have been
removed. Bump portrevision for multiple reasons.
Reported by: swills (jenkins)
Diffstat (limited to 'games')
-rw-r--r-- | games/atomix/Makefile | 2 | ||||
-rw-r--r-- | games/atomix/pkg-deinstall | 12 | ||||
-rw-r--r-- | games/atomix/pkg-plist | 3 |
3 files changed, 13 insertions, 4 deletions
diff --git a/games/atomix/Makefile b/games/atomix/Makefile index df65712e20f0..b7c1e58bbf50 100644 --- a/games/atomix/Makefile +++ b/games/atomix/Makefile @@ -4,7 +4,7 @@ PORTNAME= atomix PORTVERSION= 2.14.0 -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= games gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome2 diff --git a/games/atomix/pkg-deinstall b/games/atomix/pkg-deinstall new file mode 100644 index 000000000000..7b662cd79ab2 --- /dev/null +++ b/games/atomix/pkg-deinstall @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ "$2" = "POST-DEINSTALL" ]; then + GAMES=${PKG_PREFIX}/share/games + SCORES=${GAMES}/atomix.scores + if [ -f ${SCORES} ]; then + if [ ! -s ${SCORES} ]; then + rm -f ${SCORES} + rmdir ${GAMES} > /dev/null 2>&1 || : + fi + fi +fi diff --git a/games/atomix/pkg-plist b/games/atomix/pkg-plist index 3e95ec8b1446..4ec8f6cac2e2 100644 --- a/games/atomix/pkg-plist +++ b/games/atomix/pkg-plist @@ -66,7 +66,6 @@ share/atomix/themes/default/wall-vertical-leftx.png share/atomix/themes/default/wall-vertical-rightx.png share/atomix/themes/default/wall-vertical-top-end.png share/atomix/themes/default/wall-vertical.png -@unexec [ -s %D/share/games/atomix.scores ] || rm -f %D/share/games/atomix.scores share/gnome-2.0/ui/atomix-ui.xml share/pixmaps/atomix-icon.png share/locale/am/LC_MESSAGES/atomix.mo @@ -128,5 +127,3 @@ share/locale/zh_TW/LC_MESSAGES/atomix.mo @dirrm share/atomix/themes @dirrm share/atomix/level @dirrm share/atomix -@dirrmtry share/locale/zh_HK/LC_MESSAGES -@dirrmtry share/locale/zh_HK |