Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Enable upgrading only specified repos #527

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

utzig
Copy link
Member

@utzig utzig commented Aug 21, 2023

Reimplement support for newt upgrade <repo1> <repo2>.... Not specifying repos upgrades everything; specifying repos update only the ones given, without upgrading/installing its dependencies, etc.

This should allow advanced users to install only what is required, eg. if developing an app for nrf52x one could simply run:

newt upgrade --depth=1 apache-mynewt-core apache-mynewt-nimble nordic-nrfx

This is also useful for CI, eg, for MCUboot it's possible to use MCUboot as the root project and run:

newt upgrade --depth=1 apache-mynewt-core nordic-nrfx mbedtls

And this brings down the complete download from 1GB to just around 250MB.

Signed-off-by: Fabio Utzig <utzig@apache.org>
Reimplement support for `newt upgrade <repo1> <repo2>...`. Not
specifying repos upgrades everything; specifying repos update only the ones
given, without upgrading/installing its dependencies, etc.

This should allow advanced users to install only what is required, eg.
if developing an app for nrf52x one could simply run:

`newt upgrade --depth=1 apache-mynewt-core apache-mynewt-nimble nordic-nrfx`

This is also useful for CI, eg, for MCUboot it's possible to use MCUboot as
the root project and run:

`newt upgrade --depth=1 apache-mynewt-core nordic-nrfx mbedtls`

And this brings down the complete download from 1GB to just around 250MB.

Signed-off-by: Fabio Utzig <utzig@apache.org>
@utzig utzig changed the title Enable upgrading only specified repos [DNM] Enable upgrading only specified repos Aug 21, 2023
@utzig
Copy link
Member Author

utzig commented Aug 21, 2023

Hmmm OK, CI passed now because I fixed the dependency graph when passing repo arguments to upgrade. So I'll drop the CI changes and it will break again, because there are repo arguments in the calls, even though usage is broken and upgrade totally ignores them. This probably worked back in the day when there was newt install. So, I'll have to end up adding a --no-deps parameter or something similar and which shall maintain the broken compatibility with the broken usage...

Fix dependency graph build when no repos were given to `upgrade`.

FIXME: squash later

Signed-off-by: Fabio Utzig <utzig@apache.org>
@utzig utzig changed the title [DNM] Enable upgrading only specified repos [WIP] Enable upgrading only specified repos Aug 23, 2023
@andrzej-kaczmarek
Copy link
Contributor

we also had idea to add include/exclude repo options to project.yml. this way project can be configured to only include certain repositories required for that project or exclude those not needed.

nevertheless, this one is also nice to have.

@utzig
Copy link
Member Author

utzig commented Aug 24, 2023

we also had idea to add include/exclude repo options to project.yml. this way project can be configured to only include certain repositories required for that project or exclude those not needed.

nevertheless, this one is also nice to have.

Cool, I've found some regressions when last testing this, which is the reason for the WIP. I'll try to get back to this today or tomorrow, and will leave a comment once I think it is good for review.

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.

2 participants