dbLoadTemplate remembers macro definitions across instances and files

Bug #541160 reported by Ralph Lange
6
This bug affects 1 person
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-to-sample", HOPR="6.3", LOPF="5.7"}
....
}

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://www.aps.anl.gov/epics/tech-talk/2004/index.php?June">http://www.aps.anl.gov/epics/tech-talk/2004/index.php?June</a>)

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://www.aps.anl.gov/epics/mantis/view_bug_page.php?f_id=84

Tags: 3.14 3.14.6
Revision history for this message
Andrew Johnson (anj) wrote :

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).

Revision history for this message
Andrew Johnson (anj) wrote :

R3.14.7 Released

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.