new gnupg-1.4.4 autogen error

Bob Luckin bob at ti.com
Wed Apr 12 22:55:48 CEST 2006


Hi Werner,

If you want to save the additional process invocation for head, you could
try either of these sed commands, which I _think_ do what you want :-

   sed -n -e '/^Revision:/ s/[^0-9]//gp' -e 't quit' -e 'b' -e ': quit' -e 'q'

   sed -n -e '/^Revision:/ h' -e '/^Revision:/ s/[^0-9]//gp' -e 'g' \
          -e '/^Revision:/ q'

They'd make the code longer, though.

My Solaris version of sed does not support the POSIX semicolon, but it does
work as long as there is a newline after each command in the set, so something
like

   sed -n '/^Revision:/ { s/[^0-9]//gp
                          q
                        }'

should also work.  I'm not certain how generic this is, but I think it is more
portable than the POSIX semicolon.

Cheers, Bob

On Wed, Apr 12, 2006 at 12:06:36PM +0200, Werner Koch wrote:
> On Tue, 11 Apr 2006 14:16:20 -0500, Joe Vender said:
> 
> 
> > Running aclocal -I m4 ...
> > sed: -e expression #2, char 29: Extra characters after command
> 
> The culprit is this sed invocation:
> 
>   sed -n '/^Revision:/ {s/[^0-9]//gp;q}'
>                                     
> It extracts the Revision line (of svn info), deletes all but the
> digits and quits so that only the first line is considered.  Usin the
> semicolon is permitted by POSIX but implementations are not required
> to.  I guess I need to call head instead.  Please change the lines in
> 
> m4_define([svn_revision], m4_esyscmd([echo -n $((svn info 2>/dev/null \
>             || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q}')]))
> 
> to 
> 
> m4_define([svn_revision], m4_esyscmd([echo -n $((svn info 2>/dev/null \
>           || echo 'Revision: 0')|sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
> 
> or svn up
> 
> > Not sure where this was introduced, but it wasn't present in the code for
> > the release version of GnuPG 1.4.3. Probably just a typo error somewhere.
> 
> No, I added a feature to append the SVN revision to the evrsion
> number.
> 
> 
> > Joe Vender
> 
> 
> 
> > _______________________________________________
> > Gnupg-devel mailing list
> > Gnupg-devel at gnupg.org
> > http://lists.gnupg.org/mailman/listinfo/gnupg-devel
> 
> 
> 
> _______________________________________________
> Gnupg-devel mailing list
> Gnupg-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-devel



More information about the Gnupg-devel mailing list