txt2regex autopkgtest regression with bash 5.2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
txt2regex (Ubuntu) |
Fix Released
|
Undecided
|
Nick Rosbrook |
Bug Description
Here is a link to a failed autopkgtest log: https:/
[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_
Namely, we have:
$ bash --version | head -1
GNU bash, version 5.2.0(1)-rc2 (x86_64-
$ uin='[\]'; escape_
[\\]
vs.
$ bash --version | head -1
GNU bash, version 5.1.16(1)-release (x86_64-
$ uin='[\]'; escape_
[\\\\]
Changed in txt2regex (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Nick Rosbrook (enr0n) |
tags: | added: update-excuse |
The attached patch solves the issue. This PPA autopkgtest log verifies it: https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- kinetic- enr0n-proposed- migration/ kinetic/ amd64/t/ txt2regex/ 20220902_ 180733_ f0883@/ log.gz.