Control: tags -1 patch

On Mon, 2014-11-17 at 01:35:21 +0100, Guillem Jover wrote:
> Source: amule
> Source-Version: 2.3.1+git1a369e47-2
> Severity: important

> The amule and amule-utils packages are using obsolete absolute paths when
> calling dpkg-divert. Those have been compatibility symblinks for a while
> and got removed in dpkg 1.17.0, I'll reintroduce them in dpkg 1.17.22 but
> will be removing them 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>

Attached a patch fixing this.

Thanks,
Guillem
diff --git a/debian/amule-utils.preinst b/debian/amule-utils.preinst
index e98ac37..b0496fd 100644
--- a/debian/amule-utils.preinst
+++ b/debian/amule-utils.preinst
@@ -2,7 +2,7 @@
 
 set -e
 
-DIVERSIONS=`env LC_ALL=C /usr/sbin/dpkg-divert --list | grep -E 'by amule(-utils)?$'` || true
+DIVERSIONS=`env LC_ALL=C dpkg-divert --list | grep -E 'by amule(-utils)?$'` || true
 
 if [ -n "$DIVERSIONS" ]; then
     echo "$DIVERSIONS" | while read diversion of FILE to DIVERTED by PACKAGE; do
diff --git a/debian/amule.preinst b/debian/amule.preinst
index e98ac37..b0496fd 100644
--- a/debian/amule.preinst
+++ b/debian/amule.preinst
@@ -2,7 +2,7 @@
 
 set -e
 
-DIVERSIONS=`env LC_ALL=C /usr/sbin/dpkg-divert --list | grep -E 'by amule(-utils)?$'` || true
+DIVERSIONS=`env LC_ALL=C dpkg-divert --list | grep -E 'by amule(-utils)?$'` || true
 
 if [ -n "$DIVERSIONS" ]; then
     echo "$DIVERSIONS" | while read diversion of FILE to DIVERTED by PACKAGE; do

Reply via email to