From Dom.Mitchell@palmerharvey.co.uk Wed Aug 11 04:53:53 1999
Return-Path: <Dom.Mitchell@palmerharvey.co.uk>
Received: from mail.palmerharvey.co.uk (mail.palmerharvey.co.uk [62.172.109.58])
	by hub.freebsd.org (Postfix) with ESMTP id AAB94150D9
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 11 Aug 1999 04:53:50 -0700 (PDT)
	(envelope-from Dom.Mitchell@palmerharvey.co.uk)
Received: from ho-nt-01.pandhm.co.uk (unverified) by mail.palmerharvey.co.uk
 (Content Technologies SMTPRS 2.0.15) with ESMTP id <B0000075655@mail.palmerharvey.co.uk> for <FreeBSD-gnats-submit@freebsd.org>;
 Wed, 11 Aug 1999 12:53:37 +0100
Received: from voodoo.pandhm.co.uk (VOODOO [10.100.35.12]) by ho-nt-01.pandhm.co.uk with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0)
	id Q4XVHV5H; Wed, 11 Aug 1999 12:53:31 +0100
Received: from dom by voodoo.pandhm.co.uk with local (Exim 2.10 #1)
	id 11EWx3-0000X7-00
	for FreeBSD-gnats-submit@freebsd.org; Wed, 11 Aug 1999 12:53:49 +0100
Message-Id: <E11EWx3-0000X7-00@voodoo.pandhm.co.uk>
Date: Wed, 11 Aug 1999 12:53:49 +0100
From: Dominic Mitchell <Dom.Mitchell@palmerharvey.co.uk>
Reply-To: Dom.Mitchell@palmerharvey.co.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: Don't stamp out score files!
X-Send-Pr-Version: 3.2

>Number:         13068
>Category:       bin
>Synopsis:       Don't stamp out score files!
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    markm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 11 05:00:01 PDT 1999
>Closed-Date:    Sat Mar 20 09:14:01 PST 2004
>Last-Modified:  Sat Mar 20 09:14:01 PST 2004
>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:
Responsible-Changed-From-To: freebsd-bugs->billf 
Responsible-Changed-By: steve 
Responsible-Changed-When: Mon Sep 6 20:17:08 PDT 1999 
Responsible-Changed-Why:  
This is related to bin/12727. 
Responsible-Changed-From-To: billf->markm 
Responsible-Changed-By: billf 
Responsible-Changed-When: Sat Mar 20 07:54:51 PST 2004 
Responsible-Changed-Why:  
src/games is no longer maintained within the freebsd src/ tree. 

moving over to markm, who removed it, to see if these changes are applicable still. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=13068 
State-Changed-From-To: open->closed 
State-Changed-By: markm 
State-Changed-When: Sat Mar 20 09:10:22 PST 2004 
State-Changed-Why:  
Doesn't apply to current, and RELENG_4* is at end-of-life 
slowdown, so this is no longer appropriate for a direct 
commit there. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=13068 
>Unformatted:
