bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc-list-files-cvs failure?


From: Ralf Wildenhues
Subject: Re: vc-list-files-cvs failure?
Date: Sat, 28 Feb 2009 23:28:29 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Jim Meyering wrote on Wed, Feb 18, 2009 at 09:40:25AM CET:
> Simon Josefsson <address@hidden> wrote:
> > The test-vc-list-files-cvs.sh self test appears to fail on minimal
> > debian lenny installations:
> >
> > http://autobuild.josefsson.org/gnulib/log-200902170434329384000.txt
> > http://autobuild.josefsson.org/gnulib/log-200902170444490420000.txt

> > gnulib-tool --test --with-tests vc-list-files

> > --- expected        2009-02-17 01:16:46.000000000 -0800
> > +++ actual  2009-02-17 01:16:47.000000000 -0800
> > @@ -1,3 +1,3 @@
> > -b
> > -c
> > -d/a
> > +.b
> > +.c
> > +da
> > --- expected        2009-02-17 01:16:48.000000000 -0800
> > +++ actual  2009-02-17 01:16:48.000000000 -0800
> > @@ -1,3 +1,3 @@
> > -b
> > -c
> > -d/a
> > +.b
> > +.c
> > +da
> > FAIL: test-vc-list-files-cvs.sh
> 
> No bell rings here, but it sure looks like it's performing
> "sed s,/,," rather than the specified substitution.
> 
> That fall-back code relies on gawk, sed and /bin/sh,
> so you might try with a different shell, e.g., bash vs. dash,
> or inserting "| tee /tmp/log " into the pipeline to see if
> the damage is already done before the eval'd "sed" code runs.

I can reproduce this when awk is mawk.  The following patch fixes
the failure, the portability issue is documented in the gawk manual.

OK to apply?

Thanks,
Ralf

    Fix unportable awk script in vc-list-files.
    
    * build-aux/vc-list-files: In the replacement awk script, use
    substr with a second argument of 1, not zero.
    Report by Simon Josefsson.

diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index 419ab2a..bc5275f 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -2,9 +2,9 @@
 # List version-controlled file names.
 
 # Print a version string.
-scriptversion=2008-07-11.19
+scriptversion=2009-02-28.23
 
-# Copyright (C) 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2006-2009 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -89,7 +89,7 @@ elif test -d CVS; then
        if (!$1 && $3 !~ /^-/) {        \
          f=FILENAME;                   \
          if (f ~ /CVS\/Entries$/)      \
-           f = substr(f, 0, length(f)-11); \
+           f = substr(f, 1, length(f)-11); \
          print f $2;                   \
        }}'\''                          \
       `find "$dir" -name Entries -print` /dev/null' $postprocess




reply via email to

[Prev in Thread] Current Thread [Next in Thread]