r382 - in vdr/vdradmin/trunk/debian: . patches

Thomas Schmidt pkg-vdr-dvb-changes@lists.alioth.debian.org
Wed, 06 Apr 2005 16:00:52 +0000


Author: tschmidt
Date: 2005-04-06 16:00:52 +0000 (Wed, 06 Apr 2005)
New Revision: 382

Added:
   vdr/vdradmin/trunk/debian/patches/21_andreas-datepatch.dpatch
Modified:
   vdr/vdradmin/trunk/debian/changelog
   vdr/vdradmin/trunk/debian/patches/00list
Log:
vdradmin:
	* added 21_andreas-datepatch to support new timer format (closes: #303035)
	* prepare 0.96-5 for release


Modified: vdr/vdradmin/trunk/debian/changelog
===================================================================
--- vdr/vdradmin/trunk/debian/changelog	2005-04-06 15:20:19 UTC (rev 381)
+++ vdr/vdradmin/trunk/debian/changelog	2005-04-06 16:00:52 UTC (rev 382)
@@ -1,19 +1,20 @@
 vdradmin (0.96-5) unstable; urgency=low
 
-  * NOT RELEASED YET
-  
   * Thomas Schmidt <tschmidt@debian.org>
     - The init-script now checks if /var/log/vdradmind.log allready
       exists, if not it will create it and set owner and group to
       vdradmin:vdradmin
     - Removed Andreas Müller from uploaders - he does not intend 
       to do uploads anymore
+    - Added 21_andreas-datepatch from the vdradmin package of Tobias,
+      to support the new timer date format of vdr >= 1.3.23 
+      (closes: #303035)
   * Tobias Grimm <tg@e-tobi.net>
     - Delete temporary grabbed images after use
     - Make /var/lib/vdradmin owned by group vdr to allow vdr plugins like
       Autotimeredit to make modifications
 
- -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>  Wed, 23 Feb 2005 23:54:46 +0100
+ -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>  Wed, 06 Apr 2005 17:58:25 +0200
 
 vdradmin (0.96-4) unstable; urgency=low
 

Modified: vdr/vdradmin/trunk/debian/patches/00list
===================================================================
--- vdr/vdradmin/trunk/debian/patches/00list	2005-04-06 15:20:19 UTC (rev 381)
+++ vdr/vdradmin/trunk/debian/patches/00list	2005-04-06 16:00:52 UTC (rev 382)
@@ -1,3 +1,4 @@
 01_dist-var
 02_sectmpfiles
 03_cfgfiles-fhs
+21_andreas-datepatch

Added: vdr/vdradmin/trunk/debian/patches/21_andreas-datepatch.dpatch
===================================================================
--- vdr/vdradmin/trunk/debian/patches/21_andreas-datepatch.dpatch	2005-04-06 15:20:19 UTC (rev 381)
+++ vdr/vdradmin/trunk/debian/patches/21_andreas-datepatch.dpatch	2005-04-06 16:00:52 UTC (rev 382)
@@ -0,0 +1,59 @@
+#!/bin/sh -e
+## Date format change patch (originally from 
+## Andreas Mair <mail@andreas.vdr-developer.org>, extracted by
+## Torsten Lang <privat@torstenlang.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: The date format has changed from day of month to
+## DP: yyyy-mm-dd in the timer list (lstt command).
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -Nur vdradmin.orig/vdradmind.pl vdradmin/vdradmind.pl
+--- vdradmin.orig/vdradmind.pl	2004-02-09 00:57:06.000000000 +0100
++++ vdradmin/vdradmind.pl	2005-03-31 19:38:47.000000000 +0200
+@@ -1195,13 +1195,20 @@
+         substr($stop, 0, 2), $stop > $start ? $3 : $3 + 1, 
+         ($2 - 1), $1);
+     } else { # regular timer
+-      $startsse = my_mktime(substr($start, 2, 2), 
+-				substr($start, 0, 2), $dor, (my_strftime("%m") - 1),
+-				my_strftime("%Y"));
+-			
+-      $stopsse = my_mktime(substr($stop, 2, 2), 
+-        substr($stop, 0, 2), $stop > $start ? $dor : $dor + 1, 
+-        (my_strftime("%m") - 1), my_strftime("%Y"));
++      if ($dor =~ /(\d\d\d\d)-(\d\d)-(\d\d)/) { # vdr >= 1.3.23
++        $startsse = my_mktime(substr($start, 2, 2), substr($start, 0, 2), $3, ($2 - 1), $1);
++        $stopsse = my_mktime(substr($stop, 2, 2), substr($stop, 0, 2), $stop > $start ? $3 : $3 + 1, ($2 - 1), $1);
++      }
++      else { # vdr < 1.3.23
++        $startsse = my_mktime(substr($start, 2, 2), substr($start, 0, 2), $dor, (my_strftime("%m") - 1), my_strftime("%Y"));
++        $stopsse = my_mktime(substr($stop, 2, 2), substr($stop, 0, 2), $stop > $start ? $dor : $dor + 1, (my_strftime("%m") - 1), my_strftime("%Y"));
++
++        # move timers which have expired one month into the future
++        if(length($dor) != 7 && $stopsse < time) {
++          $startsse = my_mktime(substr($start, 2, 2), substr($start, 0, 2), $dor, (my_strftime("%m") % 12), (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0)));
++          $stopsse = my_mktime(substr($stop, 2, 2), substr($stop, 0, 2), $stop > $start ? $dor : $dor + 1, (my_strftime("%m") % 12), (my_strftime("%Y") + (my_strftime("%m") == 12 ? 1 : 0)));
++        }
++      }
+     }
+ 
+     # move timers which have expired one month into the future