MSI in 3.15.2 reports missing file instead of syntax error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Fix Released
|
Low
|
Andrew Johnson |
Bug Description
The following two files work in MSI 1.6, but fail with "missing file" in 3.15.2. Notice the extra curly brace at the end of the substitutions file.
$ cat example.template
${ONE} ${TWO}
$ cat test.subs
file example.template {
pattern {ONE, TWO}
{1, 2}
{3, 4}
}
}
vagrant @ localhost : ~/temp
$ /opt/epics/
vagrant @ localhost : ~/temp
$ /opt/epics/
msi: No template file
Usage: msi [options] [template]
stdin is used if neither template nor substitution file is given
options:
-h Print this help message
-D Output file dependencies, not substitutions
-V Undefined macros generate an error
-g All macros have global scope
-o<FILE> Send output to <FILE>
-I<DIR> Add <DIR> to include file search path
-M<SUBST> Add <SUBST> to (global) macro definitions
-S<FILE> Expand the substitutions in FILE
Expected behavior:
Generate "syntax" error.
Changed in epics-base: | |
importance: | Undecided → Low |
milestone: | none → 3.15.branch |
Changed in epics-base: | |
status: | New → Triaged |
Changed in epics-base: | |
assignee: | nobody → Andrew Johnson (anj) |
Changed in epics-base: | |
milestone: | 3.15.branch → 3.15.5 |
milestone: | 3.15.5 → 3.15.branch |
Changed in epics-base: | |
status: | Triaged → In Progress |
Changed in epics-base: | |
status: | In Progress → Fix Committed |
milestone: | 3.15.branch → 3.15.6 |
Changed in epics-base: | |
status: | Fix Committed → Fix Released |
I think I have this fixed:
Hex$ more example.template test.subs linux-x86_ 64/msi -Stest.subs -o test.db
::::::::::::::
example.template
::::::::::::::
${ONE} ${TWO}
::::::::::::::
test.subs
::::::::::::::
file example.template {
pattern {ONE, TWO}
{1, 2}
{3, 4}
}
}
Hex$ ../bin/
msi: Parse error, unexpected '}'
in substitution file 'test.subs' at line 7:
}
Hex$ ls
example.template test.subs
The attached patch contains just the changes needed to fix this and related problems, although I'm going to commit additional internal changes to msi that include code reformatting, various minor cleanups and the addition of debugging tracing macros.