dbLoadTemplate remembers macro definitions across instances and files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Fix Released
|
Medium
|
Andrew Johnson |
Bug Description
Both dbLoadTemplate and msi (Macro Substitution and Include) expand macros using the last definition they received, no matter if that definition was given for another instance or even another template file.
The commandline version of dbLoadTemplate does not show this behaviour.
This leads to:
o Typos and missing definitions not being properly recognised.
o Resulting database depending on the order of lines in the substitution file and/or the tool used for expansion.
This behavior is contra-intuitive and could lead to template expansions whose errors are hard to diagnose.
Steps to reproduce:
file test.template {
{ NAME="X", DESC="Unused channel", HOPR="10", LOPR="-10"}
....
}
file test1.template {
{ NAME="Y", DESC="Lens-
....
}
would silently use the definition for test.template without giving any hint that LOPR is not defined for the test1 instance.
Additional information:
Reported by <email address hidden>; talked about in a tech-talk thread on June 1-2, 2004. (See: <a href="http://
Tim Mooney (supported by Fritz Bartlett) suggested dbLoadTemplate issueing a warning when "old" definitions are used.
OS: any any
Platform: any
Version: R3.14.6
Original Mantis Bug: mantis-84
http://
This bug is not present in R3.14, other than in msi (which itself is not part of base so not relevent to this bug tracker project).