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

Tobias Grimm pkg-vdr-dvb-changes@lists.alioth.debian.org
Sat, 17 Jul 2004 21:56:55 +0000


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

Modified Files:
	changelog plugin-loader.sh vdr.default 
Log Message:
made patch level checking optional

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/changelog,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- changelog	17 Jul 2004 12:22:42 -0000	1.35
+++ changelog	17 Jul 2004 21:56:53 -0000	1.36
@@ -8,7 +8,8 @@
     - removed dh_shlibdeps and $shlibs:Depends from binary independent target
     - extracted common patch code from dpatch files
     - added patchlevel generation
-    - added patchlevel checking when loading plugins
+    - added patchlevel checking when loading plugins - it's enabled in
+      /etc/default by setting PLUGIN_CHECK_PATCHLEVEL="yes"
     - added ElchiAio4d as inactive patch (see README.Debian)
   * Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
     - It is not possible anymore to start more than one instance of vdr

Index: plugin-loader.sh
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/plugin-loader.sh,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- plugin-loader.sh	17 Jul 2004 21:44:55 -0000	1.6
+++ plugin-loader.sh	17 Jul 2004 21:56:53 -0000	1.7
@@ -24,20 +24,22 @@
     # find installed plugins
     installed_plugins=( `find $PLUGIN_DIR -maxdepth 1 -name "$PLUGIN_PREFIX*.so.$VERSION" -printf "%f " | sed "s/$PLUGIN_PREFIX\([^\.]\+\)\.so\.$VERSION/\1/g"` )
 
-    # extract patchlevel info
-    packages=( "vdr" "${installed_plugins[@]/#/vdr-plugin-}" )
-    eval "patchlevels=( "`LANG=en;dpkg -s ${packages[@]} 2>&1 | awk -F ':' '/^Package: / {p=$2} /^Package.*is not installed/ {print "\"\""} (/[pP]atchlevel:/ || /^$/) && p!="" {print "\""$2"\"";p=""}'`" )"
+    if [ "$PLUGIN_CHECK_PATCHLEVEL" == "yes" ]; then
+	# extract patchlevel info
+        packages=( "vdr" "${installed_plugins[@]/#/vdr-plugin-}" )
+	eval "patchlevels=( "`LANG=en;dpkg -s ${packages[@]} 2>&1 | awk -F ':' '/^Package: / {p=$2} /^Package.*is not installed/ {print "\"\""} (/[pP]atchlevel:/ || /^$/) && p!="" {print "\""$2"\"";p=""}'`" )"
 
-    # move plugins with incompatible patchlevel to $leftout
-    for (( i=1 ; i<${#patchlevels[@]} ; i++ )); do
-        if [ "${patchlevels[0]}" != "${patchlevels[$i]}" ]; then
-            leftout="${leftout} ${installed_plugins[$((i-1))]}"
-            unset installed_plugins[$((i-1))]
-        fi
-    done
+	# move plugins with incompatible patchlevel to $leftout
+	for (( i=1 ; i<${#patchlevels[@]} ; i++ )); do
+    	    if [ "${patchlevels[0]}" != "${patchlevels[$i]}" ]; then
+    		leftout="${leftout} ${installed_plugins[$((i-1))]}"
+        	unset installed_plugins[$((i-1))]
+	    fi
+	done
 
-    # cleanup the installed_plugins array
-    installed_plugins=( "${installed_plugins[@]}" )
+	# cleanup the installed_plugins array
+	installed_plugins=( "${installed_plugins[@]}" )
+    fi
     
     if [ -r $PLUGIN_ORDER_FILE ]; then
 	# load plugin order

Index: vdr.default
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.default,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- vdr.default	3 Jun 2004 00:24:27 -0000	1.10
+++ vdr.default	17 Jul 2004 21:56:53 -0000	1.11
@@ -24,6 +24,9 @@
 # Plugin order configuration
 PLUGIN_ORDER_FILE="/etc/vdr/plugins/order.conf"
 
+# Set this to load only plugins with the correct patch level
+PLUGIN_CHECK_PATCHLEVEL="no"
+
 # Command-Hooks Directory
 CMDHOOKSDIR="/usr/share/vdr/command-hooks"