vn971 / rua

Build tool for Arch Linux providing control, review and jailed build options
GNU General Public License v3.0
425 stars 41 forks source link

implement smarter source downloading in `--offline` mode #20

Open vn971 opened 5 years ago

vn971 commented 5 years ago

As raised here by @Morganamilo, https://github.com/vn971/rua/issues/19#issuecomment-471216213 it is sometimes desireable to build a package offline, but assume that PKGBUILD is being read carefully by the user and downloading of sources in it is safe.

One solution would be to have a key like --offline that does exacly that. Unfortunately, however, it'll be 2 separate keys in RUA then, which starts to feel a bit messy.

Any ideas to tackle the problem are welcome.

vn971 commented 5 years ago

This seems too complex for an already not-so-standard --offline flag.

What we could do, however, is we could run makepkg --printsrcinfo to get parseable information from the PKGBUILD. And then use already existing code to download all the sources. This way, PKGBUILD is run in offline mode only, but sources are downloaded nonetheless. Seems like "the best of both worlds".

Not sure we need this "offline" mode so much though -- personally, I stopped using it.