Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 1999 12:53:49 +0100
From:      Dominic Mitchell <Dom.Mitchell@palmerharvey.co.uk>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/13068: Don't stamp out score files!
Message-ID:  <E11EWx3-0000X7-00@voodoo.pandhm.co.uk>

next in thread | raw e-mail | index | archive | help

>Number:         13068
>Category:       bin
>Synopsis:       Don't stamp out score files!
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 11 05:00:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Dominic Mitchell
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Palmer & Harvey McLane Ltd.
>Environment:

FreeBSD voodoo.pandhm.co.uk 4.0-CURRENT FreeBSD 4.0-CURRENT #33: Mon Aug  9 09:55:06 BST 1999     root@voodoo.pandhm.co.uk:/usr/src/sys/compile/VOODOO  i386

>Description:

The Makefiles in the src/games subtree will overwrite any existing score
files under the /var/games directory.  This patch stops them from doing
that.

>How-To-Repeat:

Run rogue.  Do really well.

Make world.

Run rogue -s.  Cry.

>Fix:
	
Here's the patch.  Note that I wasn't sure what to do about the hack(6)
save and bones files.  I've commented them out here, but this should be
a point for discussion before committing.

diff -urP /usr/src/games/battlestar/Makefile games/battlestar/Makefile
--- /usr/src/games/battlestar/Makefile	Thu Jul  2 17:57:02 1998
+++ games/battlestar/Makefile	Wed Aug 11 12:13:52 1999
@@ -11,7 +11,9 @@
 #CFLAGS+= -Wall -W
 
 beforeinstall:
+.if !exists(${DESTDIR}/var/games/battlestar.log)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
 	    ${DESTDIR}/var/games/battlestar.log
+.endif
 
 .include <bsd.prog.mk>
diff -urP /usr/src/games/canfield/canfield/Makefile games/canfield/canfield/Makefile
--- /usr/src/games/canfield/canfield/Makefile	Thu Jul  2 17:57:03 1998
+++ games/canfield/canfield/Makefile	Wed Aug 11 12:14:14 1999
@@ -8,8 +8,10 @@
 MLINKS=	canfield.6 cfscores.6
 
 beforeinstall:
+.if !exists(${DESTDIR}/var/games/cfscores)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
 	    ${DESTDIR}/var/games/cfscores
+.endif
 
 .include "../../Makefile.inc"
 .include <bsd.prog.mk>
diff -urP /usr/src/games/cribbage/Makefile games/cribbage/Makefile
--- /usr/src/games/cribbage/Makefile	Thu Jul  2 17:57:04 1998
+++ games/cribbage/Makefile	Wed Aug 11 12:16:54 1999
@@ -10,7 +10,9 @@
 beforeinstall:
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
 	  ${.CURDIR}/cribbage.n  ${DESTDIR}${SHAREDIR}/games/cribbage.instr
+.if exists(${DESTDIR}/var/games/criblog)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
 	    ${DESTDIR}/var/games/criblog
+.endif
 
 .include <bsd.prog.mk>
diff -urP /usr/src/games/hack/Makefile games/hack/Makefile
--- /usr/src/games/hack/Makefile	Thu Jun 24 00:00:33 1999
+++ games/hack/Makefile	Wed Aug 11 12:31:20 1999
@@ -31,14 +31,16 @@
 beforeinstall:
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} /dev/null \
 	    ${DESTDIR}/var/games/hackdir/perm
+.if !exists(${DESTDIR}/var/games/hackdir/record)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 460 /dev/null \
 	    ${DESTDIR}/var/games/hackdir/record
+.endif
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 440 ${.CURDIR}/rumors \
 	    ${DESTDIR}/var/games/hackdir/rumors
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
 	    ${.CURDIR}/help  ${.CURDIR}/hh ${.CURDIR}/data \
 	    ${DESTDIR}/var/games/hackdir
-	rm -f ${DESTDIR}/var/games/hackdir/bones* \
-	    ${DESTDIR}/var/games/hackdir/save/*
+#	rm -f ${DESTDIR}/var/games/hackdir/bones* \
+#	    ${DESTDIR}/var/games/hackdir/save/*
 
 .include <bsd.prog.mk>
diff -urP /usr/src/games/larn/Makefile games/larn/Makefile
--- /usr/src/games/larn/Makefile	Thu Jul  2 17:57:17 1998
+++ games/larn/Makefile	Wed Aug 11 12:45:30 1999
@@ -65,9 +65,13 @@
 	(cd ${.CURDIR}/datfiles; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} \
 	    -m ${NOBINMODE} larnmaze larnopts larn.help \
 	    ${DESTDIR}${SHAREDIR}/games/larn)
+.if !exists(${DESTDIR}/var/games/larn/lscore12.0)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 660 /dev/null \
 	    ${DESTDIR}/var/games/larn/lscore12.0
+.endif
+.if !exists(${DESTDIR}/var/games/larn/llog12.0)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 660 /dev/null \
 	    ${DESTDIR}/var/games/larn/llog12.0
+.endif
 
 .include <bsd.prog.mk>
diff -urP /usr/src/games/phantasia/Makefile games/phantasia/Makefile
--- /usr/src/games/phantasia/Makefile	Thu Dec  3 10:44:27 1998
+++ games/phantasia/Makefile	Wed Aug 11 12:39:55 1999
@@ -24,8 +24,12 @@
 	${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:M*.o} -lm
 
 beforeinstall:
+.for file in ${DATAFILES}
+.if !exists($file)
 	${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 660 \
-	    ${DATAFILES} ${DESTDIR}/var/games/phantasia
+	    ${file} ${DESTDIR}/var/games/phantasia
+.endif
+.endfor
 
 # Make Phantasia map.  Change the map commands reflect your installation.
 # PLOTDEVICE is used for plotting the map.  Change as appropriate.
diff -urP /usr/src/games/robots/Makefile games/robots/Makefile
--- /usr/src/games/robots/Makefile	Thu Jul  2 17:57:23 1998
+++ games/robots/Makefile	Wed Aug 11 12:41:58 1999
@@ -10,7 +10,9 @@
 HIDEGAME=hidegame
 
 beforeinstall:
+.if !exists(${DESTDIR}/var/games/robots_roll)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
 	    ${DESTDIR}/var/games/robots_roll
+.endif
 
 .include <bsd.prog.mk>
diff -urP /usr/src/games/rogue/Makefile games/rogue/Makefile
--- /usr/src/games/rogue/Makefile	Thu Jul  2 17:57:23 1998
+++ games/rogue/Makefile	Wed Aug 11 12:42:16 1999
@@ -11,7 +11,9 @@
 MAN6=	rogue.6
 
 beforeinstall:
+.if !exists(${DESTDIR}/var/games/rogue.scores)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
 	    ${DESTDIR}/var/games/rogue.scores
+.endif
 
 .include <bsd.prog.mk>
diff -urP /usr/src/games/sail/Makefile games/sail/Makefile
--- /usr/src/games/sail/Makefile	Thu Jul  2 17:57:24 1998
+++ games/sail/Makefile	Wed Aug 11 12:42:37 1999
@@ -10,7 +10,9 @@
 HIDEGAME=hidegame
 
 beforeinstall:
+.if !exists(${DESTDIR}/var/games/saillog)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
 	    ${DESTDIR}/var/games/saillog
+.endif
 
 .include <bsd.prog.mk>
diff -urP /usr/src/games/snake/snake/Makefile games/snake/snake/Makefile
--- /usr/src/games/snake/snake/Makefile	Thu Jul  2 17:57:27 1998
+++ games/snake/snake/Makefile	Wed Aug 11 12:44:13 1999
@@ -9,10 +9,14 @@
 MLINKS=	snake.6 snscore.6
 
 beforeinstall:
+.if !exists(${DESTDIR}/var/games/snakerawscores)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
 	    ${DESTDIR}/var/games/snakerawscores
+.endif
+.if !exists(${DESTDIR}/var/games/snake.log)
 	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
 	    ${DESTDIR}/var/games/snake.log
+.endif
 
 .include "../../Makefile.inc"
 .include <bsd.prog.mk>
-- 
**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
the system manager.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.
**********************************************************************

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E11EWx3-0000X7-00>