fix: copy bundled JLink to tmp before installing#1255
fix: copy bundled JLink to tmp before installing#1255boundlesscalm wants to merge 1 commit intomainfrom
Conversation
This is necessary when installing the bundled JLink as it otherwise resides in a user created space which the root user is blocked from accessing.
|
We could technically just do this for all OS' but I don't see a reason for that except saving us like 3 lines of code. |
KievDevel
left a comment
There was a problem hiding this comment.
Missing cleanup logic: will the installer be removed after installation from tmp? Or if app will be closed unexpectedly in between on the next launch of the launcher..?
|
@KievDevel @boundlesscalm: You could simplify the logic a bit and also get automatic cleanup with pc-nrfconnect-launcher/src/main/apps/appChanges.ts Lines 205 to 207 in cca24df With resource management you have to be a bit careful at what point the resource goes out of scope and thus can be disposed but I think this should be fine to use here. If you want to, I can also sketch an implementation or we can pair on it. |
While slightly leaning towards the simpler code, both are fine for me: Doing this only for Linux or for all OS’. |
|
We can't use the shared Not sure if we have to be so explicit in removing it anyway. It's in the /tmp/ folder which is expected to be automatically cleaned in ubuntu and most other OS-es. |
Ah, I thought it is currently only a problem because it is mounted through FUSE, not because the ownership and permissions on the directory. We could also change ownership and permissions on the directory, seems like the easier approach to me, but another solution that works is also ok.
We do not strictly have to clean it up but I still think it is good practice to do it, also given that the temp folders are usually only wiped on startup. |
This is necessary when installing the bundled JLink as it otherwise resides in a user created space which the root user is blocked from accessing.