Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support database path not checked(?) by ibek #170

Closed
amichelotti opened this issue Jan 25, 2024 · 3 comments
Closed

support database path not checked(?) by ibek #170

amichelotti opened this issue Jan 25, 2024 · 3 comments

Comments

@amichelotti
Copy link

It seems that if I refer a not existent database in modbus.support.yaml (but I think is independent from the module) no error is generated neither in building the support neither in building the runtime : ibek runtime generate ..

To reproduce just change a databese entry:

databases:
      - file: $(SUPPORT)/modbus/db/ai.template.nontexist

if I dont specify an absolute path where does ibek search the file? are there predefined search paths? if I want to add some additional templates to an xx ibek-support I put them in the support directory together with xxx.support.yaml? if yes how can I refer them in the xxx.support.yaml?

@gilesknap
Copy link
Member

you are working late! :-) I'll take a look at this in the morning. It sounds like a bug.

@gilesknap
Copy link
Member

My experience testing this today is that there is no checking at support module compilation time. There is a failure at runtime if you have created an instance of the definition containing the bad db name:

+ includes='-I /epics/support/asyn/db -I /epics/support/autosave/db -I /epics/support/busy/db -I /epics/support/calc/db -I /epics/support/iocStats/db -I /epics/support/motor/db -I /epics/support/pmac/db -I /epics/support/sncseq/db -I /epics/support/sscan/db '
+ bash -c 'msi -o/epics/runtime/ioc.db -I /epics/support/asyn/db -I /epics/support/autosave/db -I /epics/support/busy/db -I /epics/support/calc/db -I /epics/support/iocStats/db -I /epics/support/motor/db -I /epics/support/pmac/db -I /epics/support/sncseq/db -I /epics/support/sscan/db  -I/epics/runtime -S/epics/runtime/ioc.subst'
msi: Can't open file 'pmacStatusAxis.template.XXXXX'

If you don't specify absolute path you will get the search path that you can see in my snippet above.
The search path is constructed by the ibek support register step in install.sh and you can see the path you will get
in:
/epics/support/configure/RELEASE.shell

There are also the module specific path environment variables that you could have used in there (but you don't need them for database templates really unless there is a template name clash between modules, because EPICS_DB_INCLUDE_PATH usually has you covered. Note that this automatic discovery would only work if your templates are in MODULE/db - if not then you would need to use one of these macros to help you construct the path.

I'm going to open another issue to cover the lack of checking until runtime.

@gilesknap
Copy link
Member

closing and continuing this discussion in #171 and #172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants