svn commit: r361273 - head/games/atomix

John Marino marino at FreeBSD.org
Tue Jul 8 17:26:37 UTC 2014


Author: marino
Date: Tue Jul  8 17:26:36 2014
New Revision: 361273
URL: http://svnweb.freebsd.org/changeset/ports/361273
QAT: https://qat.redports.org/buildarchive/r361273/

Log:
  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)

Added:
  head/games/atomix/pkg-deinstall   (contents, props changed)
Modified:
  head/games/atomix/Makefile
  head/games/atomix/pkg-plist

Modified: head/games/atomix/Makefile
==============================================================================
--- head/games/atomix/Makefile	Tue Jul  8 17:11:02 2014	(r361272)
+++ head/games/atomix/Makefile	Tue Jul  8 17:26:36 2014	(r361273)
@@ -4,7 +4,7 @@
 
 PORTNAME=	atomix
 PORTVERSION=	2.14.0
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	games gnome
 MASTER_SITES=	GNOME
 DIST_SUBDIR=	gnome2

Added: head/games/atomix/pkg-deinstall
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/atomix/pkg-deinstall	Tue Jul  8 17:26:36 2014	(r361273)
@@ -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

Modified: head/games/atomix/pkg-plist
==============================================================================
--- head/games/atomix/pkg-plist	Tue Jul  8 17:11:02 2014	(r361272)
+++ head/games/atomix/pkg-plist	Tue Jul  8 17:26:36 2014	(r361273)
@@ -66,7 +66,6 @@ share/atomix/themes/default/wall-vertica
 share/atomix/themes/default/wall-vertical-rightx.png
 share/atomix/themes/default/wall-vertical-top-end.png
 share/atomix/themes/default/wall-vertical.png
- at 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
- at dirrmtry share/locale/zh_HK/LC_MESSAGES
- at dirrmtry share/locale/zh_HK


More information about the svn-ports-head mailing list