[Pkg-nethack-devel] nethack/debian nethack-common.config,1.3,1.4 nethack-common.postinst,1.5,1.6

Ben Gertzfield che@quantz.debian.org
Mon, 13 Oct 2003 20:35:03 +0000


Update of /cvsroot/pkg-nethack/nethack/debian
In directory quantz:/tmp/cvs-serv4889

Modified Files:
	nethack-common.config nethack-common.postinst 
Log Message:
Use lt-nl test instead of lt; was always prompting on new installs

Index: nethack-common.postinst
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/debian/nethack-common.postinst,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- nethack-common.postinst	13 Oct 2003 18:54:11 -0000	1.5
+++ nethack-common.postinst	13 Oct 2003 20:35:01 -0000	1.6
@@ -29,7 +29,11 @@
     # Also check to see whether old save directory exists and contains
     # files, that means we're upgrading from a version where nethack-common
     # is new.
-    if dpkg --compare-versions "$2" lt 3.4.0 || \
+    #
+    # Use lt-nl test here, because an empty $2 means a new install.
+    # lt-nl means empty is always greater than any other version,
+    # so the first part of this test will not return true on a new install.
+    if dpkg --compare-versions "$2" lt-nl 3.4.0 || \
         [ -d $OLDLOGDIR -a -n "`ls $OLDLOGDIR/save 2>/dev/null || true`" ]; then
       # But, it's a non-issue if there were no save files to begin with.
       if [ -d $LOGDIR -a -n "`ls $LOGDIR/save 2>/dev/null || true`" ]; then

Index: nethack-common.config
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/debian/nethack-common.config,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- nethack-common.config	13 Oct 2003 18:53:00 -0000	1.3
+++ nethack-common.config	13 Oct 2003 20:35:01 -0000	1.4
@@ -7,7 +7,10 @@
 LOGDIR=/var/games/nethack
 OLDLOGDIR=/var/lib/games/nethack
 
-if dpkg --compare-versions "$2" lt 3.4.0 || \
+# Use lt-nl test here, because an empty $2 means a new install.
+# lt-nl means empty is always greater than any other version, 
+# so the first part of this test will not return true on a new install.
+if dpkg --compare-versions "$2" lt-nl 3.4.0 || \
   [ -d $OLDLOGDIR -a -n "`ls $OLDLOGDIR/save 2>/dev/null || true`" ]; then
 
   # Save games are not to be treated lightly!