flatpak / flatpak-builder-tools

Various helper tools for flatpak-builder
192 stars 105 forks source link

npm packages to download build tarballs #7

Open adityashah1212 opened 6 years ago

adityashah1212 commented 6 years ago

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

nedrichards commented 6 years ago

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?

adityashah1212 commented 6 years ago

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.

alexlarsson commented 6 years ago

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