[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] Non-portable sed command in find_patch
From: |
Jean Delvare |
Subject: |
Re: [Quilt-dev] Non-portable sed command in find_patch |
Date: |
Thu, 22 Sep 2005 19:55:18 +0200 |
Hi Andreas,
> > 1* Go with the grep replacement I suggested, and its slight
> > performance drop.
>
> We have multipe instances of sed grouping, which would all need
> changing:
>
> $ grep -w 'sed.*\\(' */*.in test/*
> quilt/fork.in: | sed -e
> 's:\(\|\.diff\?\|\.patch\)\(\|\.gz\|\.bz2\)$::')
> quilt/fork.in: | sed -ne 's:.*\(-[0-9]\+\)$:\1:'p)
> scripts/patchfns.in: echo "$1" | sed -e 's:\([][^$/.*\\]\):\\\1:g'
> scripts/patchfns.in: echo "$1" | sed -e 's:\([][?{(|)}^$/.+*\\]\):\\\1:g'
> scripts/patchfns.in: set -- $(sed -e "/^$bre\(\|\.patch\|\.diff\?
> \)\(\|\.gz\|\.bz2\)\([ "$'\t'"]\|$\)/!d" \
> test/conflicts.test: $ sed -e "s/^\\([17]\\)\$/\\1-/" one.orig > one.txt
> test/conflicts.test: $ sed -e "s/^\\([1267]\\)\$/\\1-/" one.orig one.txt
> test/conflicts.test: $ sed -e "s/^\\([123567]\\) \$/\\1-/" one.orig >
> one.txt
Grouping isn't the problem, alternatives within a group are, which is
why I listed only three problematic uses. I'm not arguing in favor of
changing them anyway, just trying to be fair.
> > 3* Let the code as is, and I install GNU sed.
>
> That's what I would recommend to do. Can we add a configure.ac test
> for this? We really want a version of sed that supports grouping.
OK, fine with me. Yes, we need a sed test, I'll add one, much similar to
the grep test, should be very easy.
> The test suite uses the installed version of quilt, not the one in
> the package. This would need fixing, but I don't see how to do so
> easily.
I think I remember either John or Gary has plans to do this.
Whatever, I don't think it makes a difference WRT which binaries to
use. The installed version of quilt is likely to be the same as the one
in the package (why run the test suite otherwise?). Prepending the
package's compat/ directory to the PATH when running the test suite
can't hurt, can it?
Thanks,
--
Jean Delvare