Package: pkg-config
Version: 0.26-1
Severity: minor
Tags: patch

The current crosswrapper script will fail if used on paths continaing
spaces. It also uses sed unnecesarily. 

Patch attached to improve code quality (yes, the original was my fault
:-)

diff -ur pkg-config-0.26/debian/pkg-config-crosswrapper 
pkg-config-0.26.robust/debian/pkg-config-crosswrapper
--- pkg-config-0.26/debian/pkg-config-crosswrapper      2011-11-28 
16:51:06.000000000 +0000
+++ pkg-config-0.26.robust/debian/pkg-config-crosswrapper       2011-11-28 
16:49:02.363787002 +0000
@@ -2,5 +2,6 @@
 # pkg-config wrapper for cross-building
 # Sets pkg-config search path to target arch path only.
 
-triplet=`basename $0 | sed -e 's:-pkg-config::'`
+basename=`basename "$0"`
+triplet="${basename%-pkg-config}"
 PKG_CONFIG_LIBDIR=/usr/${triplet}/lib/pkgconfig pkg-config $@

(The PKG_CONFIG_LIBDIR path needs fixing too, but that's a more complex matter 
dealt
with in other bugs)

-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-486
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -ur pkg-config-0.26/debian/pkg-config-crosswrapper pkg-config-0.26.robust/debian/pkg-config-crosswrapper
--- pkg-config-0.26/debian/pkg-config-crosswrapper	2011-11-28 16:51:06.000000000 +0000
+++ pkg-config-0.26.robust/debian/pkg-config-crosswrapper	2011-11-28 16:49:02.363787002 +0000
@@ -2,5 +2,6 @@
 # pkg-config wrapper for cross-building
 # Sets pkg-config search path to target arch path only.
 
-triplet=`basename $0 | sed -e 's:-pkg-config::'`
+basename=`basename "$0"`
+triplet="${basename%-pkg-config}"
 PKG_CONFIG_LIBDIR=/usr/${triplet}/lib/pkgconfig pkg-config $@

Reply via email to