vdr/vdr/debian changelog plugin-loader.sh vdr.default

Tobias Grimm pkg-vdr-dvb-changes@lists.alioth.debian.org
Sun, 15 Aug 2004 15:01:24 +0000


Update of /cvsroot/pkg-vdr-dvb/vdr/vdr/debian
In directory haydn:/tmp/cvs-serv29438/debian

Modified Files:
	changelog plugin-loader.sh vdr.default 
Log Message:
checking each plugin now, if it can be loaded by vdr

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/changelog,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- changelog	8 Aug 2004 17:51:37 -0000	1.45
+++ changelog	15 Aug 2004 15:01:22 -0000	1.46
@@ -1,3 +1,10 @@
+vdr (1.2.6-6) unstable; urgency=low
+
+  * Thomas Günther <tom@toms-cafe.de>:
+    - new (optional) plugin check (with "vdr -V -P plugin")
+
+ -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>  Sun, 15 Aug 2004 18:00:00 +0200 
+
 vdr (1.2.6-5) unstable; urgency=low
 
   * Tobias Grimm <tg@e-tobi.net> 

Index: plugin-loader.sh
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/plugin-loader.sh,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- plugin-loader.sh	9 Aug 2004 17:38:55 -0000	1.11
+++ plugin-loader.sh	15 Aug 2004 15:01:22 -0000	1.12
@@ -2,10 +2,6 @@
 # This file is called by /etc/init.d/vdr
 #
 
-VERSION=`/usr/bin/vdr -V 2>/dev/null | grep '^vdr[- ]' | sed -e 's/.*(\(.*\)).*/\1/'`
-
-PLUGINS=""
-
 getplugins ()
 {
     local plugin_order
@@ -17,7 +13,9 @@
     local packages
     local patchelvels
     local leftout
+    local leftout2
 
+    PLUGINS=""
 
     echo -ne "\nSearching for plugins:"
 
@@ -40,7 +38,22 @@
 	# cleanup the installed_plugins array
 	installed_plugins=( "${installed_plugins[@]}" )
     fi
-    
+
+    if [ "$PLUGIN_CHECK_STARTABLE" == "yes" ]; then
+
+        # move not startable plugins to $leftout2
+        for (( i=0 ; i<${#installed_plugins[@]} ; i++ )); do
+            if ! $VDRPRG -V -L $PLUGIN_DIR -P ${installed_plugins[$i]} \
+	         2>/dev/null | grep -q "^${installed_plugins[$i]} "; then
+                leftout2="${leftout2} ${installed_plugins[$i]}"
+                unset installed_plugins[$i]
+            fi
+        done
+
+        # cleanup the installed_plugins array
+        installed_plugins=( "${installed_plugins[@]}" )
+    fi
+
     if [ -r $PLUGIN_ORDER_FILE ]; then
 	# load plugin order
 	plugin_order=( `cat $PLUGIN_ORDER_FILE | sed "s/#.*$//"` )
@@ -83,5 +96,13 @@
              "possible binary incompatibility: "
         echo -n $leftout
     fi
+
+    # warn about not startable plugins
+    if [ "$leftout2" != "" ]; then
+        echo -ne "\nWARNING: The following plugins have been left out due to"\
+             "really binary incompatibility: "
+        echo -n $leftout2
+    fi
+
     echo
 }

Index: vdr.default
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.default,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- vdr.default	7 Aug 2004 10:23:08 -0000	1.12
+++ vdr.default	15 Aug 2004 15:01:22 -0000	1.13
@@ -24,6 +24,9 @@
 # Plugin order configuration
 PLUGIN_ORDER_FILE="/etc/vdr/plugins/order.conf"
 
+# Set this to load only startable plugins (check with "vdr -V -P plugin")
+PLUGIN_CHECK_STARTABLE="yes"
+
 # Set this to load only plugins with the correct patch level
 PLUGIN_CHECK_PATCHLEVEL="no"