Re: BUG #5339: Version of Perl detected incorrectly

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: BUG #5339: Version of Perl detected incorrectly
Дата
Msg-id 34d269d41002222350s2affabbcr6fb60e862da481be@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #5339: Version of Perl detected incorrectly  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #5339: Version of Perl detected incorrectly
Список pgsql-bugs
On Mon, Feb 22, 2010 at 14:31, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I'm inclined to stay with the same basic
> implementation and just hack up the regexp some more to cope with 5.11's
> more verbose -v output.

And here is a stab at that:
$ echo "This is perl, version 4.0" | sed -n 's/This is perl.*v[a-z
]*\([0-9]\.[\.0-9]*\).*$/\1/p'
4.0
$ echo "This is perl, v5.8.0" | sed -n 's/This is perl.*v[a-z
]*\([0-9]\.[\.0-9]*\).*$/\1/p'
5.8.0
$ echo "This is perl, v5.10.1" | sed -n 's/This is perl.*v[a-z
]*\([0-9]\.[\.0-9]*\).*$/\1/p'
5.10.1
$ echo "This is perl 5, version 11, subversion 4
(v5.11.4-114-ga4cc961*) built for" | sed -n 's/This is perl.*v[a-z
]*\([0-9]\.[\.0-9]*\).*$/\1/p'
5.11.4

---
*** config/perl.m4
--- config/perl.m4
***************
*** 10,16 **** if test -z "$PERL"; then
  fi

  if test "$PERL"; then
!   pgac_perl_version=`$PERL -v 2>/dev/null | sed -n ['s/This is perl,
v[a-z ]*//p'] | sed ['s/ .*//']`
    AC_MSG_NOTICE([using perl $pgac_perl_version])
    if echo "$pgac_perl_version" | sed ['s/[.a-z_]/ /g'] | \
      $AWK '{ if ([$]1 = 5 && [$]2 >= 8) exit 1; else exit 0;}'
--- 10,16 ----
  fi

  if test "$PERL"; then
!   pgac_perl_version=`$PERL -v 2>/dev/null | sed -n ['s/This is
perl.*v[a-z ]*\([0-9]\.[\.0-9]*\).*$/\1/p']`
    AC_MSG_NOTICE([using perl $pgac_perl_version])
    if echo "$pgac_perl_version" | sed ['s/[.a-z_]/ /g'] | \
      $AWK '{ if ([$]1 = 5 && [$]2 >= 8) exit 1; else exit 0;}'
*** configure
--- configure
***************
*** 6867,6873 **** fi
  fi

  if test "$PERL"; then
!   pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is perl,
v[a-z ]*//p' | sed 's/ .*//'`
    { $as_echo "$as_me:$LINENO: using perl $pgac_perl_version" >&5
  $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
    if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
--- 6867,6873 ----
  fi

  if test "$PERL"; then
!   pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is
perl.*v[a-z ]*\([0-9]\.[\.0-9]*\).*$/\1/p'`
    { $as_echo "$as_me:$LINENO: using perl $pgac_perl_version" >&5
  $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
    if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \

В списке pgsql-bugs по дате отправления:

Предыдущее
От: tomas@tuxteam.de
Дата:
Сообщение: Re: BUG #5341: problema al iniciar pgadmin
Следующее
От: Alex Hunsaker
Дата:
Сообщение: Re: BUG #5339: Version of Perl detected incorrectly