Bug#260092: XSI:ism in prerm and postinst
Package: debian-policy
Version: 3.6.1.1
Severity: normal
Tags: patch
Having the policy package meet policy is probably a good idea =)
The included patch fixes use of the XSI:ism `-o' in prerm and postinst.
Rationale:
Policy 10.4
http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
Regards: David Weinehall
diff -ur debian-policy-3.6.1.1-old/debian/postinst.in debian-policy-3.6.1.1/debian/postinst.in
--- debian-policy-3.6.1.1-old/debian/postinst.in 2003-03-07 21:33:14.000000000 +0200
+++ debian-policy-3.6.1.1/debian/postinst.in 2004-07-18 15:14:20.000000000 +0300
@@ -56,7 +56,7 @@
# there is a most recently configured version.
:
- elif test -z "$2" -o "$2" = "<unknown>"; then
+ elif test -z "$2" || test "$2" = "<unknown>"; then
# The package has not ever been configured on this system, or was
# purged since it was last configured.
:
@@ -88,7 +88,7 @@
;;
abort-deconfigure)
- if test "$2" != in-favour -o "$5" != removing; then
+ if test "$2" != in-favour || test "$5" != removing; then
echo "$0: undocumented call to \`postinst $*'" 1>&2
exit 0
fi
diff -ur debian-policy-3.6.1.1-old/debian/prerm.in debian-policy-3.6.1.1/debian/prerm.in
--- debian-policy-3.6.1.1-old/debian/prerm.in 2001-05-02 04:26:47.000000000 +0300
+++ debian-policy-3.6.1.1/debian/prerm.in 2004-07-18 15:14:25.000000000 +0300
@@ -49,7 +49,7 @@
fi ;;
deconfigure)
- if test "$2" != in-favour -o "$5" != removing; then
+ if test "$2" != in-favour || test "$5" != removing; then
echo "$0: undocumented call to \`prerm $*'" 1>&2
exit 0
fi
Reply to: