Source: geki2
Source-Version: 2.0.3-8
Severity: important
Tags: patch

Hi!

This package is using obsolete absolute paths when stating or calling
dpkg-statoverride. This has been a compatibility symlinks for a while
and got removed in dpkg 1.17.0, I'll reintroduce it in dpkg 1.17.22 but
will be removing it again in 1.18.x.

Please stop using absolute paths in maintainer scripts, as they will
suffer this kind of problem. For more info please see:

<https://lintian.debian.org/tags/command-with-path-in-maintainer-script.html>

although that lintian check does not currently trigger for this issue,
but it should.

Attached a patch fixing this, by always assuming that dpkg-statoverride
is present, which has been true for a very long time now.

Thanks,
Guillem
diff --git a/debian/postinst b/debian/postinst
index c7ba0aa..2fc361c 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -9,15 +9,13 @@ case "$1" in
     # Cancel my old stupid use of dpkg-statoverride
     if [ "$1" = "configure" ] && [ "$2" != "" ] &&
           dpkg --compare-versions "$2" le "2.0.3-4" &&
-          [ -x /usr/sbin/dpkg-statoverride ] &&
           dpkg-statoverride --list "$PROG" >/dev/null
     then
         dpkg-statoverride --remove "$PROG"
     fi
 
     # Properly use statoverride
-    if ! [ -x /usr/sbin/dpkg-statoverride ] || \
-        ! dpkg-statoverride --list "$PROG" >/dev/null ; then
+    if ! dpkg-statoverride --list "$PROG" >/dev/null ; then
       chown root:games "$PROG"
       chmod 2755 "$PROG"
     fi

Reply via email to