Package: armagetron
Version: 0.2.7.0-1.1
Severity: serious
# Tags: patch

[EMAIL PROTECTED]:~$ ls -ld /usr/share/doc/armagetron 
drwxr-xr-x 2 root root 4096 Sep 26  2003 /usr/share/doc/armagetron
[EMAIL PROTECTED]:~$ ls -l /usr/share/doc/armagetron 
total 0

This violates the policy about " ... must ... changelog ...
copyright".

I'm fairly certain that this *doesn't* explain the problem, but the
armagetron{,-server} preinst have:

|if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt 0.2; then
|        mv -f $orig $backup || true
|fi
|if [ "$1" = "abort-upgrade" ] && dpkg --compare-versions "$2" lt 0.2; then
|        mv -f $backup $orig || true
|fi

But the rollback paths are never in the same script as the forward
path; prerm and postrm contain each other's rollback paths.  I'm
including modified scripts (and additions), which have been
lightly-tested for syntax and idempotency.

Changes:
Use preinst abort-upgrade instead of postrm abort-upgrade;
Use mv -T
Drop "|| true"; what can reasonably fail??
"#! /": 4 byte magic

So .. any idea how the missing files can happen?
#! /bin/sh
set -e

# allow /usr/share/doc/armagetron-server to be replaced by symlink in upgrade
back=/usr/share/doc/armagetron-server-TMP_upgrade
[ "$1" = "configure" ] && [ -d $back ] && rm -rf $back

#DEBHELPER#
#! /bin/sh
set -e

p=/usr/share/doc
orig=$p/armagetron-server
back=$orig-TMP_upgrade

case "$1" in
remove|purge|upgrade|failed-upgrade|disappear)
        :;
        ;;

abort-install|abort-upgrade)
        # Undo the effects of preinst
        if [ -e $back ] && dpkg --compare-versions "$2" lt 0.2;
        then
                mv -fT $back $orig
        fi
        ;;

*)
        echo "$0: undocumented call \"[EMAIL PROTECTED]"" >&2
        exit 1
        ;;
esac;

#DEBHELPER#
#! /bin/sh
set -e

# allow /usr/share/doc/armagetron-server to be replaced by symlink in upgrade
p=/usr/share/doc
orig=$p/armagetron-server
back=$orig-TMP_upgrade

case "$1" in
install|upgrade)
        if [ -e "$orig" ] && dpkg --compare-versions "$2" lt 0.2;
        then
                mv -fT $orig $back
        fi
        ;;

abort-upgrade)
        # postrm doesn't have anything to undo.
        ;;

*)
        echo "$0: undocumented call \"[EMAIL PROTECTED]"" >&2
        exit 1
        ;;
esac

#DEBHELPER#
#! /bin/sh
set -e

# allow /usr/share/doc/armagetron to be replaced by symlink in upgrade
back=/usr/share/doc/armagetron-TMP_upgrade
[ "$1" = "configure" ] && [ -d $back ] && rm -rf $back

#DEBHELPER#
#! /bin/sh
set -e

p=/usr/share/doc
orig=$p/armagetron
back=$orig-TMP_upgrade

case "$1" in
remove|purge|upgrade|failed-upgrade|disappear)
        :;
        ;;

abort-install|abort-upgrade)
        # Undo the effects of preinst
        if [ -e $back ] && dpkg --compare-versions "$2" lt 0.2;
        then
                mv -fT $back $orig
        fi
        ;;

*)
        echo "$0: undocumented call \"[EMAIL PROTECTED]"" >&2
        exit 1
        ;;
esac;

#DEBHELPER#
#! /bin/sh
set -e

# allow /usr/share/doc/armagetron to be replaced by symlink in upgrade
p=/usr/share/doc
orig=$p/armagetron
back=$orig-TMP_upgrade

case "$1" in
install|upgrade)
        if [ -e "$orig" ] && dpkg --compare-versions "$2" lt 0.2;
        then
                mv -fT $orig $back
        fi
        ;;

abort-upgrade)
        # postrm doesn't have anything to undo.
        ;;

*)
        echo "$0: undocumented call \"[EMAIL PROTECTED]"" >&2
        exit 1
        ;;
esac

#DEBHELPER#

Reply via email to