Description
No existing issues.
- There is no existing issue for my request.
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.