Package: nethack Version: 3.4.3-10.6 Severity: normal Tags: patch Maintainer scripts include code dealing with pre-3.4.0 versions. These versions were in Debian....in 2001.
Such upgrades are of course not supported and I therefore recommend dropping the relevant code, including the debconf template (which I was about to review) and translations. The drop of translations is not part of the proposed patch. One has to run "debconf-updatepo" after removing the template, to have the translations dropped from PO files. -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru nethack.old/debian/nethack-common.config nethack/debian/nethack-common.config --- nethack.old/debian/nethack-common.config 2009-02-14 12:18:34.083868711 +0100 +++ nethack/debian/nethack-common.config 2009-02-19 07:17:50.106519570 +0100 @@ -7,24 +7,6 @@ LOGDIR=/var/games/nethack OLDLOGDIR=/var/lib/games/nethack -# 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 ] && [ -n "`ls $OLDLOGDIR/save 2>/dev/null || true`" ]; then - - # Save games are not to be treated lightly! - db_input high nethack-common/backup-incompatible || true - db_go - - db_get nethack-common/backup-incompatible - - if [ "$RET" = abort ]; then - db_stop - exit 1 - fi -fi - db_input low nethack-common/recover-setgid || true db_go diff -Nru nethack.old/debian/nethack-common.postinst nethack/debian/nethack-common.postinst --- nethack.old/debian/nethack-common.postinst 2009-02-14 12:18:34.035868342 +0100 +++ nethack/debian/nethack-common.postinst 2009-02-19 07:19:15.978520039 +0100 @@ -15,6 +15,7 @@ # /var/lib/games/nethack -> /var/games/nethack since the save files # changed format anyway. # Modified 11 Oct 2003, move all the preinst stuff here. +# Modified 19 Feb 2009, drop the "backup incompatible" stuff set -e @@ -24,64 +25,6 @@ OLDLOGDIR=/var/lib/games/nethack if [ "$1" = "configure" ]; then - # Only do this if we are upgrading from a version of Nethack - # that has incompatible save files from this version. - # 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. - # - # 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 ] && [ -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 ] && [ -n "`ls $LOGDIR/save 2>/dev/null || true`" ]; then - PROCESSDIRS="$LOGDIR" - fi - - if [ -d $OLDLOGDIR ] && [ -n "`ls $OLDLOGDIR/save 2>/dev/null || true`" ]; then - PROCESSDIRS="$PROCESSDIRS $OLDLOGDIR" - fi - - if [ -n "$PROCESSDIRS" ]; then - # The question should have been popped at this point - db_get nethack-common/backup-incompatible - - case "$RET" in - # Shouldn't happen, but handle just in case. - abort) - exit 1 - ;; - backup) - if [ -n "$PROCESSDIRS" ]; then - echo "Backing up incompatible save games from previous versions: " - - for GAMEDIR in $PROCESSDIRS; do - if [ ! -d $GAMEDIR ]; then continue; fi - - if [ ! -z "`ls $GAMEDIR/save 2>/dev/null || true`" ]; then - BACKUP=`tempfile --directory=/tmp --prefix=nethk --suffix .tar.gz` - echo " backing up $GAMEDIR to $BACKUP ..." - tar czf $BACKUP $GAMEDIR > /dev/null 2>&1 - fi - - rm -rf $GAMEDIR/save/ $GAMEDIR/*.gz - done - - echo "Don't forget to do something with these backup files!" - fi - ;; - purge) - rm -rf $LOGDIR $OLDLOGDIR - ;; - # Do nothing! This better happen... - ignore) - ;; - esac - fi - fi - db_get nethack-common/recover-setgid if [ "$RET" = false ]; then diff -Nru nethack.old/debian/nethack-common.templates nethack/debian/nethack-common.templates --- nethack.old/debian/nethack-common.templates 2009-02-14 12:18:34.067868635 +0100 +++ nethack/debian/nethack-common.templates 2009-02-19 07:19:28.810519957 +0100 @@ -1,21 +1,3 @@ -Template: nethack-common/backup-incompatible -Type: select -_Choices: abort, backup, purge, ignore -Default: backup -_Description: Should NetHack back up your old, incompatible save files? - You are upgrading from a version of NetHack whose save files are not - compatible with the version you are upgrading to. You may either have them - backed up into /tmp, purge them, ignore this problem completely, or abort - this installation and manually handle NetHack's save files. Your score files - will be lost if you choose to purge. - . - If you choose to back up, the files will be backed up into a - gzip-compressed tar archive in /tmp with a random name starting - with 'nethk' and ending in '.tar.gz'. - . - Old NetHack save files can be found in /var/games/nethack (or - /var/lib/games/nethack, for versions before 3.4.0). - Template: nethack-common/recover-setgid Type: boolean Default: false