Re: configure fails on Maemo/OS2008 (sed: no previous regexp)

2008-03-22 Thread Jim Meyering
Vincent Lefevre <[EMAIL PROTECTED]> wrote:
> When configuring coreutils 6.10 on my Nokia N810 (Linux Maemo/OS2008,
> using BusyBox v1.6.1), I get:
>
> [...]
> configure: error: internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, ,
>does not match the list of default-not-installed programs
>(arch hostname su) also recorded in ./src/Makefile.am

Thanks for the report.
That seems to be because you're using busybox's sed.
A snippet adapted from configure.ac:

$ busybox sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* \[\(.*\)\])/{s//\1/;s/,/ /gp
}' configure.ac
sed: No previous regexp.
[Exit 1]

with all other versions of sed, it does this:

$ sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* \[\(.*\)\])/{s//\1/;s/,/ /gp
}' /cu/configure.ac
arch hostname su


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: configure fails on Maemo/OS2008 (sed: no previous regexp)

2008-03-22 Thread Andreas Schwab
Jim Meyering <[EMAIL PROTECTED]> writes:

> $ busybox sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* \[\(.*\)\])/{s//\1/;s/,/ /gp
> }' configure.ac
> sed: No previous regexp.
> [Exit 1]

>From (autoconf)Limitations of Usual Tools::
 Commands inside { } brackets are further restricted.  Posix says
 that they cannot be preceded by addresses, `!', or `;', and that
 each command must be followed immediately by a newline, without any
 intervening blanks or semicolons.  The closing bracket must be
 alone on a line, other than white space preceding or following it.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: configure fails on Maemo/OS2008 (sed: no previous regexp)

2008-03-22 Thread Jim Meyering
Andreas Schwab <[EMAIL PROTECTED]> wrote:
> Jim Meyering <[EMAIL PROTECTED]> writes:
>> $ busybox sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* \[\(.*\)\])/{s//\1/;s/,/ /gp
>> }' configure.ac
>> sed: No previous regexp.
>> [Exit 1]
>
>>From (autoconf)Limitations of Usual Tools::
>  Commands inside { } brackets are further restricted.  Posix says
>  that they cannot be preceded by addresses, `!', or `;', and that
>  each command must be followed immediately by a newline, without any
>  intervening blanks or semicolons.  The closing bracket must be
>  alone on a line, other than white space preceding or following it.

Hi Andreas,

Yes, I recall the above from earlier problems with this part of
configure.ac.  However, you seem to have left out an explanation
of how that quote is relevant to this problem with busybox's sed.

This appears to be a busybox "limitation".
I expect to work around it with this patch:

portability: work around a "busybox sed" limitation
* configure.ac: While every other sed tested supports usage like
'/\(re\)/{s//\1/;...}', and POSIX appears to requires this,
busybox's sed does not support it.  So duplicate the regexp:
'/\(re\)/{s/\(re\)/\1/;...}'.  Reported by Vincent Lefevre:
.

Signed-off-by: Jim Meyering <[EMAIL PROTECTED]>
---
 configure.ac |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index cc4e152..14505fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -280,7 +280,8 @@ no_install_progs_default=`echo "$t"|sed 's/ $//'`
 # The compromise is to ensure that the space-separated list extracted
 # above matches the literal 2nd argument below.
 c="$srcdir/configure.ac"
-t=`sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])/{s//\1/;s/,/ /gp
+re='^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])'
+t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp
 }' $c`
 case $t in
   $no_install_progs_default) ;;
--
1.5.5.rc0.21.g740fd


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: [PATCH] Implement join --check-order and --nocheck-order.

2008-03-22 Thread Dmitry V. Levin
On Tue, Feb 19, 2008 at 03:44:00PM +0100, Jim Meyering wrote:
> James Youngman <[EMAIL PROTECTED]> wrote:
> > This is a consolidated patch including all the previous changes,
> > implementing order checking in join by default.  "make distcheck"
> > works (if I move distcheck-hook from Makefile.am to GNUmakefile).
> >
> > 2008-02-16  James Youngman  <[EMAIL PROTECTED]>
> >
> > * src/join.c: Support --check-order and --nocheck-order.
> > New variables check_input_order, seen_unpairable and
> > issued_disorder_warning[]. For --check-order, verify that the
> ...
> 
> Thanks again.
> I've just pushed that.

Looks like this commit v6.10-70-ga1e7156 introduces a regression:

$ printf '%s\n%s\n' '1 b' '2 a' | sort -k2,2 | join -12 -21 - /dev/null
join: File 1 is not in sorted order
$ echo $?
1
$ join --version |grep join
join (GNU coreutils) 6.10.133-677610


-- 
ldv


pgpM8iqj9OOJZ.pgp
Description: PGP signature
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: configure fails on Maemo/OS2008 (sed: no previous regexp)

2008-03-22 Thread Vincent Lefevre
On 2008-03-22 19:20:37 +0100, Jim Meyering wrote:
> This appears to be a busybox "limitation".
> I expect to work around it with this patch:
> 
>   portability: work around a "busybox sed" limitation
>   * configure.ac: While every other sed tested supports usage like
>   '/\(re\)/{s//\1/;...}', and POSIX appears to requires this,
>   busybox's sed does not support it.  So duplicate the regexp:
>   '/\(re\)/{s/\(re\)/\1/;...}'.  Reported by Vincent Lefevre:
>   .

Thanks, I could build the coreutils on the N810.

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils