Bug#264081: Plugin quoting bugs
Darren Salt
pkg-vdr-dvb-devel@lists.alioth.debian.org
Fri, 06 Aug 2004 23:56:40 +0100
This message is in MIME format which your mailer apparently does not support.
You either require a newer version of your software which supports MIME, or
a separate MIME decoding utility. Alternatively, ask the sender of this
message to resend it in a different format.
--451585523--988108149--757531652
Content-Type: text/plain; charset=us-ascii
Package: vdr
Version: 1.2.6-4
Severity: important
Tags: patch
Despite the quoting code in plugin-loader.sh, I'm still seeing plugins not
being loaded, with vdr complaining about things like "plugin '"xine' not
found". (Note the extra ".)
Since shell array variables are already in use (aren't they bashisms, and
shouldn't vdr.init use /bin/bash?), we may as well wander deeper into bash
territory to fix this: the attached patch fixes plugin-loader.sh, and the
following command completes the job:
sed -i -e 's/\$PLUGINS/"${PLUGINS[@]}"/' debian/vdr.init
(It occurs to me that this /could/ be caused by a bug in bash 2.05b-2-15...)
--
| Darren Salt | linux (or ds) at | nr. Ashington,
| woody, sarge, | youmustbejoking | Northumberland
| RISC OS | demon co uk | Toon Army
| <URL:http://www.youmustbejoking.demon.co.uk/> (PGP 2.6, GPG keys)
I'm going to the Missing Persons Bureau to see if anyone is looking for me.
--451585523--988108149--757531652
Content-Type: text/plain; charset=iso-8859-1; name="plugin-loader.patch"
Content-Disposition: attachment; filename="plugin-loader.patch"
Content-Transfer-Encoding: quoted-printable
--- vdr/debian/plugin-loader.sh 2004-08-07 00:01:44.0 +0100
=0D+++ vdr/debian/plugin-loader.sh 2004-08-07 00:01:44.0 +0100
=0D@@ -4,7 +4,7 @@
=0D=20
=0D VERSION=3D`/usr/bin/vdr -V 2>/dev/null | grep '^vdr[- ]' | sed -e 's/=
.*(\(.*\)).*/\1/'`
=0D=20
=0D-PLUGINS=3D""
=0D+PLUGINS=3D()
=0D=20
=0D getplugins ()
=0D {
=0D@@ -47,13 +47,15 @@
=0D ordered_plugins=3D( "${ordered_plugins[@]}" "${installed_plugins[=
@]}" )
=0D=20
=0D # add the command line arguments for each plugin
=0D+ i=3D0
=0D for plugin in ${ordered_plugins[@]}; do
=0D echo -n " $plugin"
=0D if [ -r "$PLUGIN_CFG_DIR/plugin.$plugin.conf" ] ; then
=0D arguments=3D( `cat $PLUGIN_CFG_DIR/plugin.$plugin.conf | =
sed "s/#.*$//"` )
=0D- PLUGINS=3D"$PLUGINS -P \"$plugin ${arguments[*]}\""
=0D+ PLUGINS[$i]=3D"-P $plugin ${arguments[*]}"
=0D else
=0D- PLUGINS=3D"$PLUGINS -P $plugin"
=0D+ PLUGINS[$i]=3D"-P $plugin"
=0D fi
=0D+ i=3D$(($i+1))
=0D done
=0D }
=0D
--451585523--988108149--757531652--