[Bug 1988481] Re: txt2regex autopkgtest regression with bash 5.2

Graham Inggs 1988481 at bugs.launchpad.net
Sat Sep 3 09:08:26 UTC 2022


Your upstream PR was picked up by txt2regex's Debian maintainer, and
someone else already sync'd it.

** Changed in: txt2regex (Ubuntu)
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1988481

Title:
  txt2regex autopkgtest regression with bash 5.2

Status in txt2regex package in Ubuntu:
  Fix Released

Bug description:
  Here is a link to a failed autopkgtest log:
  https://autopkgtest.ubuntu.com/results/autopkgtest-
  kinetic/kinetic/amd64/t/txt2regex/20220827_144122_eb850@/log.gz. The
  relevant snippet is this:

  [FAILED #53, line 77] txt2regex --all --history '241ยค\'
  @@ -1,23 +1,23 @@
  - Regex awk       : [\\]
  - Regex chicken   : [\\\\]
  + Regex awk       : [\]
  + Regex chicken   : [\\]
    Regex ed        : [\]
    Regex egrep     : [\]
  - Regex emacs     : [\\\\]
  - Regex expect    : [\\]
  + Regex emacs     : [\\]
  + Regex expect    : [\]
    Regex find      : [\]
  - Regex gawk      : [\\]
  + Regex gawk      : [\]
    Regex grep      : [\]
  - Regex javascript: [\\]
  - Regex lex       : [\\]
  - Regex mawk      : [\\]
  - Regex mysql     : [\\\\]
  - Regex perl      : [\\]
  - Regex php       : [\\\\]
  - Regex postgres  : [\\]
  + Regex javascript: [\]
  + Regex lex       : [\]
  + Regex mawk      : [\]
  + Regex mysql     : [\\]
  + Regex perl      : [\]
  + Regex php       : [\\]
  + Regex postgres  : [\]
    Regex procmail  : [\]
  - Regex python    : [\\]
  + Regex python    : [\]
    Regex sed       : [\]
  - Regex tcl       : [\\]
  + Regex tcl       : [\]
    Regex vi        : [\]
  - Regex vim       : [\\]
  + Regex vim       : [\]
   

  The issue comes down to how the following expression -- which is
  simulating a section of txt2regex.sh -- is evaluated in bash 5.2 vs
  prior versions:

  $ uin='[\]'; escape_metachar='\\'; echo
  ${uin/\\/$escape_metachar$escape_metachar}

  Namely, we have:

    $ bash --version | head -1
    GNU bash, version 5.2.0(1)-rc2 (x86_64-pc-linux-gnu)
    $ uin='[\]'; escape_metachar='\\'; echo ${uin/\\/$escape_metachar$escape_metachar}
    [\\]

    vs.

    $ bash --version | head -1
    GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
    $ uin='[\]'; escape_metachar='\\'; echo ${uin/\\/$escape_metachar$escape_metachar}
    [\\\\]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/txt2regex/+bug/1988481/+subscriptions




More information about the Ubuntu-sponsors mailing list