[ANNOUNCE] VDR developer version 1.3.48

Message ID 444D0E49.9080607@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger April 24, 2006, 5:43 p.m. UTC
  Oliver Endriss wrote:
> Klaus Schmidinger wrote:
>> VDR developer version 1.3.48 is now available at
>> ...
>> - Simplified the 'grep|awk|sed' command to retrieve the VDR/APIVERSION to a single
>>    'sed' call.
> 
> (1) My sed does not accept lines like this:
> | sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/; p }' config.h
> | sed: -e expression #1, char 47: Extra characters after command
> 
> This works:
> | sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/p; }' config.h
> | 1.3.47
> 
> (2) The newplugin script is broken:
> - references VDRVERSION, not APIVERSION
> - '\' must be escaped
> - sed problem as above

Just to make sure I don't make any stupid last minute error
here's the complete change that resulted from this.
Maybe somebody finds the time to look over this...

Klaus
  

Comments

Udo Richter April 24, 2006, 7:31 p.m. UTC | #1
Klaus Schmidinger wrote:
> Just to make sure I don't make any stupid last minute error
> here's the complete change that resulted from this.
> Maybe somebody finds the time to look over this...

I gave everything a test run, seems to work. GNU-sed 4.1.2. Out of 
curiosity, I've tried solaris 5.6 sed of 1997 and AIX 5.2 sed, and they 
accepted it too.

Cheers,

Udo
  
C.Y.M April 26, 2006, 6:49 a.m. UTC | #2
Klaus Schmidinger wrote:
> Oliver Endriss wrote:
>> Klaus Schmidinger wrote:
>>> VDR developer version 1.3.48 is now available at
>>> ...
>>> - Simplified the 'grep|awk|sed' command to retrieve the
>>> VDR/APIVERSION to a single
>>>    'sed' call.
>>
>> (1) My sed does not accept lines like this:
>> | sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/; p }' config.h
>> | sed: -e expression #1, char 47: Extra characters after command
>>
>> This works:
>> | sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/p; }' config.h
>> | 1.3.47
>>
>> (2) The newplugin script is broken:
>> - references VDRVERSION, not APIVERSION
>> - '\' must be escaped
>> - sed problem as above
> 
> Just to make sure I don't make any stupid last minute error
> here's the complete change that resulted from this.
> Maybe somebody finds the time to look over this...
> 
> Klaus
> 

Im trying to test this from the console and I seem to have a problem with the
following command (using sed-4.1.4-7 from debian sid):

 "sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' config.h"

This returns nothing.

 "sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/; p }' config.h"

This returns:

1.3.48

Is that right? Removing one of the "$" seems to fix it..

BR.
  
C.Y.M April 26, 2006, 7:18 a.m. UTC | #3
>>
> 
> Im trying to test this from the console and I seem to have a problem with the
> following command (using sed-4.1.4-7 from debian sid):
> 
>  "sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' config.h"
> 
> This returns nothing.
> 
>  "sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/; p }' config.h"
> 
> This returns:
> 
> 1.3.48
> 
> Is that right? Removing one of the "$" seems to fix it..
> 

Sorry, I meant to say this command returns nothing:

sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h

and this command works:

sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$/\1/p' config.h


BR.
  
Klaus Schmidinger April 26, 2006, 7:31 a.m. UTC | #4
C.Y.M wrote:
> Klaus Schmidinger wrote:
>> Oliver Endriss wrote:
>>> Klaus Schmidinger wrote:
>>>> VDR developer version 1.3.48 is now available at
>>>> ...
>>>> - Simplified the 'grep|awk|sed' command to retrieve the
>>>> VDR/APIVERSION to a single
>>>>    'sed' call.
>>> (1) My sed does not accept lines like this:
>>> | sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/; p }' config.h
>>> | sed: -e expression #1, char 47: Extra characters after command
>>>
>>> This works:
>>> | sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/p; }' config.h
>>> | 1.3.47
>>>
>>> (2) The newplugin script is broken:
>>> - references VDRVERSION, not APIVERSION
>>> - '\' must be escaped
>>> - sed problem as above
>> Just to make sure I don't make any stupid last minute error
>> here's the complete change that resulted from this.
>> Maybe somebody finds the time to look over this...
>>
>> Klaus
>>
> 
> Im trying to test this from the console and I seem to have a problem with the
> following command (using sed-4.1.4-7 from debian sid):
> 
>  "sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' config.h"
> 
> This returns nothing.
> 
>  "sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/; p }' config.h"
> 
> This returns:
> 
> 1.3.48
> 
> Is that right? Removing one of the "$" seems to fix it..

That's all right. The '$' needs to be doubled in the Makefile.

Klaus
  
Dr. Werner Fink April 26, 2006, 8:19 a.m. UTC | #5
On Tue, Apr 25, 2006 at 11:49:29PM -0700, C.Y.M wrote:
> Klaus Schmidinger wrote:
> > Oliver Endriss wrote:
> >> Klaus Schmidinger wrote:
> >>> VDR developer version 1.3.48 is now available at
> >>> ...
> >>> - Simplified the 'grep|awk|sed' command to retrieve the
> >>> VDR/APIVERSION to a single
> >>>    'sed' call.
> >>
> >> (1) My sed does not accept lines like this:
> >> | sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/; p }' config.h
> >> | sed: -e expression #1, char 47: Extra characters after command
> >>
> >> This works:
> >> | sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/p; }' config.h
> >> | 1.3.47
> >>
> >> (2) The newplugin script is broken:
> >> - references VDRVERSION, not APIVERSION
> >> - '\' must be escaped
> >> - sed problem as above
> > 
> > Just to make sure I don't make any stupid last minute error
> > here's the complete change that resulted from this.
> > Maybe somebody finds the time to look over this...
> > 
> > Klaus
> > 
> 
> Im trying to test this from the console and I seem to have a problem with the
> following command (using sed-4.1.4-7 from debian sid):
> 
>  "sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' config.h"
> 
> This returns nothing.
> 
>  "sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$/\1/; p }' config.h"
> 
> This returns:
> 
> 1.3.48
> 
> Is that right? Removing one of the "$" seems to fix it..

Hmm ... within Makefiles the first $ is readed by the make program
and if there is no second $ you'll get the make variable $/ ...

       Werner
  

Patch

--- ./Makefile	2006/04/24 17:06:48	1.90
+++ ./Makefile	2006/04/24 17:18:06
@@ -81,8 +81,8 @@ 
 
 # The version numbers of VDR and the plugin API (taken from VDR's "config.h"):
 
-VDRVERSION = $(shell sed -ne '/define VDRVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' config.h)
-APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' config.h)
+VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
 
 ifdef VFAT
 # for people who want their video directory on a VFAT partition
--- ./PLUGINS/src/hello/Makefile	2006/04/22 09:59:44	1.13
+++ ./PLUGINS/src/hello/Makefile	2006/04/24 17:20:58
@@ -30,7 +30,7 @@ 
 
 ### The version number of VDR's plugin API (taken from VDR's "config.h"):
 
-APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
 
 ### The name of the distribution archive:
 
--- ./PLUGINS/src/osddemo/Makefile	2006/04/22 09:59:49	1.7
+++ ./PLUGINS/src/osddemo/Makefile	2006/04/24 17:21:00
@@ -30,7 +30,7 @@ 
 
 ### The version number of VDR's plugin API (taken from VDR's "config.h"):
 
-APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
 
 ### The name of the distribution archive:
 
--- ./PLUGINS/src/servicedemo/Makefile	2006/04/22 09:59:55	1.5
+++ ./PLUGINS/src/servicedemo/Makefile	2006/04/24 17:21:01
@@ -31,7 +31,7 @@ 
 
 ### The version number of VDR's plugin API (taken from VDR's "config.h"):
 
-APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
 
 ### The name of the distribution archive:
 
--- ./PLUGINS/src/skincurses/Makefile	2006/04/22 10:00:03	1.5
+++ ./PLUGINS/src/skincurses/Makefile	2006/04/24 17:21:02
@@ -30,7 +30,7 @@ 
 
 ### The version number of VDR's plugin API (taken from VDR's "config.h"):
 
-APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
 
 ### The name of the distribution archive:
 
--- ./PLUGINS/src/sky/Makefile	2006/04/22 10:00:17	1.7
+++ ./PLUGINS/src/sky/Makefile	2006/04/24 17:21:03
@@ -30,7 +30,7 @@ 
 
 ### The version number of VDR's plugin API (taken from VDR's "config.h"):
 
-APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
 
 ### The name of the distribution archive:
 
--- ./PLUGINS/src/status/Makefile	2006/04/22 10:00:24	1.11
+++ ./PLUGINS/src/status/Makefile	2006/04/24 17:21:04
@@ -30,7 +30,7 @@ 
 
 ### The version number of VDR's plugin API (taken from VDR's "config.h"):
 
-APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
 
 ### The name of the distribution archive:
 
--- ./PLUGINS/src/svdrpdemo/Makefile	2006/04/22 10:00:32	1.5
+++ ./PLUGINS/src/svdrpdemo/Makefile	2006/04/24 17:21:06
@@ -30,7 +30,7 @@ 
 
 ### The version number of VDR's plugin API (taken from VDR's "config.h"):
 
-APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
 
 ### The name of the distribution archive:
 
--- ./newplugin	2006/04/22 10:04:10	1.27
+++ ./newplugin	2006/04/24 17:18:41
@@ -85,7 +85,7 @@ 
 
 ### The version number of VDR's plugin API (taken from VDR's "config.h"):
 
-APIVERSION = \$(shell sed -ne '/define VDRVERSION/ { s/^.*"\(.*\)".*\$\$/\\1/; p }' \$(VDRDIR)/config.h)
+APIVERSION = \$(shell sed -ne '/define APIVERSION/s/^.*"\\(.*\\)".*\$\$/\\1/p' \$(VDRDIR)/config.h)
 
 ### The name of the distribution archive:
 
--- HISTORY	2006/04/24 17:09:32	1.1844
+++ HISTORY	2006/04/24 17:29:38
@@ -4652,3 +4652,7 @@ 
 2006-04-24: Version 1.4.0
 
 - Fixed initializing 'noapiv' in the Makefile (reported by Ronny Kornexl).
+- Fixed extracting APIVERSION to work with older versions of 'sed' (reported by
+  Oliver Endriss; thanks also to Udo Richter for a shorter version of the 'sed'
+  expression).
+- Fixed broken APIVERSION extraction line in 'newplugin' (thanks to Oliver Endriss).
--- CONTRIBUTORS	2006/04/24 17:08:13	1.934
+++ CONTRIBUTORS	2006/04/24 17:29:56
@@ -614,6 +614,8 @@ 
  display in the ST:TNG skin's channel display
  for suggesting to make CharArray::DataOwnData::assign() in 'libsi' more robust
  against invalid data
+ for reporting a problem in extracting APIVERSION with older versions of 'sed'
+ for fixing broken APIVERSION extraction line in 'newplugin'
 
 Reinhard Walter Buchner <rw.buchner@freenet.de>
  for adding some satellites to 'sources.conf'
@@ -1412,6 +1414,7 @@ 
  --help or --version option
  for suggesting to add a warning about plugins that don't honor APIVERSION in their
  Makefile
+ for providing a shorter version of the 'sed' expression for extracting APIVERSION
 
 Sven Kreiensen <svenk@kammer.uni-hannover.de>
  for his help in keeping 'channels.conf.terr' up to date