Skip to content

Don't download tarballs if a local git repo found#1295

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
no1wudi:master
Aug 28, 2022
Merged

Don't download tarballs if a local git repo found#1295
xiaoxiang781216 merged 1 commit into
apache:masterfrom
no1wudi:master

Conversation

@no1wudi
Copy link
Copy Markdown
Contributor

@no1wudi no1wudi commented Aug 27, 2022

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.

@no1wudi no1wudi closed this Aug 27, 2022
@no1wudi no1wudi reopened this Aug 27, 2022
Comment thread crypto/libtomcrypt/Makefile Outdated
Comment thread interpreters/wamr/Makefile
Comment thread crypto/libtomcrypt/Makefile
Comment thread testing/ltp/Makefile
Comment thread mlearning/darknet/Makefile Outdated
Comment thread netutils/cjson/Makefile Outdated
Comment thread system/embedlog/Makefile Outdated
Comment thread testing/unity/Makefile Outdated
Comment thread interpreters/quickjs/Makefile Outdated
@xiaoxiang781216
Copy link
Copy Markdown
Contributor

@no1wudi should we do the similar change to nuttx repo too?

@mlyszczek
Copy link
Copy Markdown
Contributor

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.

@xiaoxiang781216
Copy link
Copy Markdown
Contributor

@mlyszczek This change doesn't forbid we unify the download process to a common place. Let's improve the system step by step.

@mlyszczek
Copy link
Copy Markdown
Contributor

mlyszczek commented Aug 27, 2022

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.

@no1wudi no1wudi force-pushed the master branch 2 times, most recently from f1d790f to a76ed3e Compare August 28, 2022 05:16
Comment thread mlearning/libnnablart/Makefile
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit 2e2630e into apache:master Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants