flatpak-builder-tools
flatpak-builder-tools copied to clipboard
npm packages to download build tarballs
There is a issue that concerns me the most. It seems there are npm packages that are just downloaders. What I mean by that is these packages are only meant to run during build time to download a release of another package. I came across this over the weekend. To give an example there is this chromedriver. It seems to be downloading the tarball based on some configuration at build time. I have yet to figure out how to pre-download this. But that is not the real issue here. If I were to list the issues, I would say there are two
- [ ] What should we do in case the package doesn't support pre-downloading of the release?
- [ ] And how many such packages should we try to keep a track of? There could be tons out there.
In the first instance I'm inclined to say 'nothing' is something like chromedriver useful for --release builds? or just devel mode.
But as a slightly more nuanced response, if there's something common about these packages then try and integrate that into something like --recursive?
The chrome driver is needed in the release build (build:prod was the target to be more precise in github-desktop).
We won't be able to get these packages to flatpak if ignore the issue of not being able to pre-downloading the release. Because even if the packager decides to download it as a part of manifest, that would yield nothing. And we can't have downloading done during build stage.
As for if we have anything in common among these packages, the answer is I am not sure.
It is not a perfect solution, but many of these setups has some way to pre-seed the download. For instance, this manually pre-seeds the nwjs release: https://github.com/flathub/io.github.betaflight.BetaflightConfigurator/blob/master/io.github.betaflight.BetaflightConfigurator.json#L110
And there is some special casing for electron dependencies: https://github.com/flatpak/flatpak-builder-tools/blob/master/npm/flatpak-npm-generator.py#L146