Stream: tooling
Topic: Firely Terminal: Issues install local package
Patrick Werner (Nov 15 2021 at 08:50):
We started to use firely terminal in our IG pipelines to install needed packages. Doing this we found 3 issues:
- fhir install --file throws an error if the local package isn't known to the package servers:
fhir install Downloads/term_0.2.0.tgz --file ✔ 4383 17:46:50
Added: molit.fhir.common-terminology 0.2.0.
Restore could not be completed.
Package not found: molit.fhir.common-terminology 0.2.0
Patrick Werner (Nov 15 2021 at 08:52):
- fhir bake creates snapshots with missing/wrong ids on elements (@Alexander Zautke @Chris Moesel @Yannick Börner )
Patrick Werner (Nov 15 2021 at 08:52):
Patrick Werner (Nov 15 2021 at 08:53):
- fhir install installs packages in: /root/.local/share/.fhir instead of /root/.fhir which then lets sushi & IG publisher fail (can be fixed with a symlink, would be nice of firely terminal always would use the correct/same folder as sushi/IG publisher
Martijn Harthoorn (Nov 17 2021 at 09:26):
I vaguely remember we had a specific reason to use .local/share/, I think it had to do with permissions.
Martijn Harthoorn (Nov 17 2021 at 09:27):
And of course there are a lot of users that now have their cache in there, which I cannot just bust. But I'll check what we can do. Maybe make it configurable.
Ewout Kramer (Nov 17 2021 at 09:29):
Wouldn't the Sushi/IG publisher have the same permission problems then?
Ewout Kramer (Nov 17 2021 at 09:30):
Would it be possible to use the same directory across tools and let the tools create the symlink so both situations work?
Grahame Grieve (Nov 17 2021 at 09:46):
there is a spec, @Martijn Harthoorn even wrote it. And that's root/.fhir
Ewout Kramer (Nov 17 2021 at 09:55):
I tried to check it out myself, but cannot find it. Where is it?
Ewout Kramer (Nov 17 2021 at 09:56):
I know about https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache and https://confluence.hl7.org/display/FHIR/NPM+Package+Specification, but cannot find that location...
Martijn Harthoorn (Nov 17 2021 at 10:04):
https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache
works for me.
Martijn Harthoorn (Nov 17 2021 at 10:24):
@Grahame Grieve , you're right. I can't remember why we changed in FT. I vaguely remember some Linux guy told me that I should not put it directly under ~/, but apparently I forgot to bring it up for discussion.
Grahame Grieve (Nov 17 2021 at 22:05):
well, it's kind of late to change it now - There's a lot of tooling out there following the spec
Patrick Werner (Nov 18 2021 at 10:58):
afaik there is no difference in permissions between ~ and ~/.local
.local ist normally was brought up by GNOME and is for "non-user-generated data" but for program data. I think firely terminal just should use ~/.local - how it is stated in the FHIR spec.
Martijn Harthoorn (Nov 25 2021 at 08:02):
But the spec does not mention .local
Alexander Zautke (Nov 25 2021 at 11:19):
+1 for changing it to the folder mentioned in the spec, so "/~/.fhir/packages" (not .local!)
Alexander Zautke (Nov 25 2021 at 11:21):
In case someone needs to debug the issue and ends up here... the symlink can be created with "ln -s ~/.local/share/.fhir ~/.fhir".
Patrick Werner (Nov 25 2021 at 13:35):
Martijn Harthoorn said:
But the spec does not mention .local
my bad, sorry i meant ~/.fhir
Martijn Harthoorn (Nov 25 2021 at 13:36):
ok. So I think everyone agrees.
I have made a new release for Firely Terminal with that path for linux. (2.5.0-beta-2)
Martijn Harthoorn (Nov 25 2021 at 13:36):
(the local package issue is on our radar, but not fixed yet)
Last updated: Apr 12 2022 at 19:14 UTC