-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
[enhancement]: install osDependencies bevore npm install is run #2938
Comments
Note that the repository does not conatin the io-package.json bundled with the to-be-installed release but the version located at Github master/main head. This is sufficient for displaying new but is definitly not useable to install some software as requirements between to-be-installed release (aka npm package) and github head might differ significantly. |
We will talk about this and yes especially Martins point is valid, however this might be a tradeoff we will take as also done e.g. for |
Taking the flags and i.e. requiring a newer admin / js-controller thean really required is an acceptable restiction. But keep in mind that release 1.x.x of an adapter might require os-dependency aaa while the current head either removed the dependency or requires bbb. Both would suddenly break installation of release 1.x.x without releasing a new version or something like that. In addion this would be hard to diagnose for maintainer why the installation suddenly requires a wrong dependency. In my oppinion either the currect content of io-package bound to the release must be used - or this problem / feature cannot be solved at least now. |
Samuel mentioned jsdelivr in the Telegram Chat: https://www.jsdelivr.com/documentation which can be used to read any file from any package version and even can install packages from github. Example: https://cdn.jsdelivr.net/npm/iobroker.loxone@2.0.0/io-package.json Just wanted to add it here so that it is not lost. :-) |
No existing issues.
Description
Currently osDependencies from io-package.json are only installed after a successufl npm installation of the adapter.
I want to propose to change that (or add another option) in order to install dependencies before running npm install.
Why?
If packages are installed before npm install this would help to support packages that require certain libraries to be successfully build. One example is the rpi2 adapter (after version 2.0.0). It depends on a gpio-librarie that needs to build a module which required libgpiod-dev to be installed, otherwise the headers are not found.
The librarie is not usually installed on all systems. Adding libgpiod-dev to osDependencies did not help here, because npm installation already fails.
How?
Currently osDependencies are installed in "finishUpdate" or "finishInstallation" after npm insallation. The info from io-package.json of the new adapter version seems to be extracted from the repository already (in order to check the version, for example). So osDependencies could be extracted from that information and be installed before the npm step.
Since it seems that we never uninstall system packages anyway, it would not be necessary to fear a failed npm installation, currently.
The text was updated successfully, but these errors were encountered: