Don't download tarballs if a local git repo found#1295
Conversation
|
@no1wudi should we do the similar change to nuttx repo too? |
|
Good idea but I think it's a bad approach. Right now, all packages hardcode their download code, they simply call "wget $(URL)", which makes it basically impossible to provide own tarballs (most common use case would be to protect yourself from upstream link going offline). I think the right approach would be to create function that would take 2 arguments, base URL (like http://domain.com/distfiles) and filename (libpackage-1.0.0.tar.gz). Kconfig would hold cache url (or urls). Then, said download function would first try to get $filename from cache url(s) and then, once file could not be found, upstream URL from 1st argument would be used. This will unify package download, and will limit clutter in app Makefiles. |
|
@mlyszczek This change doesn't forbid we unify the download process to a common place. Let's improve the system step by step. |
|
Sure, but I still think proposed implementation is suboptimal, it adds unnecessary clutter and maintanence to all 3rd party apps. New download function could also support git links with specified hash/tag. Idea is very good, but proposed implementation looks more like a workaround, a band-aid, not a solution. |
f1d790f to
a76ed3e
Compare
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Summary
Don't download tarballs if a local git repo found, to save time or avoid modify the makefile in local, make it easy to intergrate nuttx with customized third party software.
Impact
Refactor only
Testing
CI and local machine.