Hi Dirk, I know we probably haven’t changed the instructions somewhere
(feel free to point out where if you know), but other than the emails
that Launchpad sends out we don’t often look at bug reports on Launchpad
now, please file new bugs EPICS Base on GitHub instead of here.
I saw this exact same issue myself a few weeks ago so I agree that it’s
a bug that has a fairly easy fix (remove the conditional check and
always call the macLib expansion routine). If you’d like to post a PR on
GitHub that would be great; I might get around to it at some point
if/when I look at the bugs here, but it’s a lower priority for me than
my APS Upgrade project work, so I’d welcome your help.
Thanks,
- Andrew
** Changed in: epics-base
Status: New => Confirmed
--
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/2052814
Title:
dbLoadRecords with subs=NULL fails to expand macros with defaults
Status in EPICS Base:
Confirmed
Bug description:
A template file that only contains macros with default values can be
loaded with `dbLoadRecords("file.db","")` but not with
`dbLoadRecords("file.db",NULL)`. In particular, in the startup script,
it cannot be loaded with `dbLoadRecords "file.db"` but only with
`dbLoadRecords "file.db",""`. (VxWorks shell as well as iocsh.)
Using such a macro in a record name results in the error message:
ERROR: Bad character '$' in Record/Alias name "$(P=)Name"
Using macros with defaults in fields shows error messages like this:
ERRORName.PREC Has unexpanded macro
Can't set "Name.PREC" to "$(PREC=3)" : Bad Field value
ERRORERROR failed to load 'file.db'
(Unrelated: Someone please fix the missing blanks after ERROR and the
ERRORERROR.)
The reason is that `dbReadCOM`, the function that does the real work,
only creates a `macHandle` when `substitutions` is not `NULL`. Not
having a `macHandle` prevents any macro substitution from working,
even those which provide a default value.
In the old times, when macros could not have defaults, this was fine,
but not any more. A macro handle should always be created, even if it
stays empty when `substitutions` is `NULL`.
To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/2052814/+subscriptions
- References:
- [Bug 2052814] [NEW] dbLoadRecords with subs=NULL fails to expand macros with defaults Dirk Zimoch via Core-talk
- Navigate by Date:
- Prev:
[Bug 2052814] [NEW] dbLoadRecords with subs=NULL fails to expand macros with defaults Dirk Zimoch via Core-talk
- Next:
[Bug 2052814] Re: dbLoadRecords with subs=NULL fails to expand macros with defaults Dirk Zimoch via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
<2024>
- Navigate by Thread:
- Prev:
[Bug 2052814] [NEW] dbLoadRecords with subs=NULL fails to expand macros with defaults Dirk Zimoch via Core-talk
- Next:
[Bug 2052814] Re: dbLoadRecords with subs=NULL fails to expand macros with defaults Dirk Zimoch via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
<2024>
|