mirror of
https://github.com/python/cpython
synced 2024-09-05 00:05:39 +00:00
bpo-42874: Remove grep -qE options for Solaris 10 compatibility (GH-24200)
According to [bpo-42874](), some versions of grep do not support the `-q` and `-E` options. Although both options are used elsewhere in the configure script, this particular bit of validation can be achieved without them, so there's no real harm in using a grep call with no flags. Would be good to get some people taking advantage of the `--with-tzpath` arguments in the wild to try this out.. Local testing seems to indicate that this does the same thing, but I don't know that we have any buildbots using this option. Maybe @pablogsal? [bpo-42874]():
This commit is contained in:
parent
4db8988420
commit
0f66498fd8
|
@ -0,0 +1,3 @@
|
|||
Removed the grep -q and -E flags in the tzpath validation section of the
|
||||
configure script to better accomodate users of some platforms (specifically
|
||||
Solaris 10).
|
2
configure
vendored
2
configure
vendored
|
@ -10252,7 +10252,7 @@ validate_tzpath() {
|
|||
fi
|
||||
|
||||
# Bad paths are those that don't start with /
|
||||
if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
|
||||
if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then
|
||||
as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
|
||||
return 1;
|
||||
fi
|
||||
|
|
|
@ -2980,7 +2980,7 @@ validate_tzpath() {
|
|||
|
||||
# Bad paths are those that don't start with /
|
||||
dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
|
||||
if ( echo $1 | grep -qE '(^|:)(@<:@^/@:>@|$)' ); then
|
||||
if ( echo $1 | grep '\(^\|:\)\(@<:@^/@:>@\|$\)' > /dev/null); then
|
||||
AC_MSG_ERROR([--with-tzpath must contain only absolute paths, not $1])
|
||||
return 1;
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue