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

project: Add origin remote #546

Closed

Conversation

Mierunski
Copy link

Git submodules with relative paths fail to update when repository
does not contain origin remote. This commit adds origin remote
ass addition to current remotes.

fixes #545

src/west/app/project.py Outdated Show resolved Hide resolved
Git submodules with relative paths fail to update when repository
does not contain `origin` remote. This commit makes sure
`origin` remote exists.
# Git submodules that use relative paths resolve them based
# on `origin` remote, make sure we have it
try:
project.git(f'remote get-url -- origin')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would not have helped in the case of sof.

Cause with Zephyr, the sof repo here:
https://github.com/zephyrproject-rtos/sof/

is a fork of:
https://github.com/thesofproject/sof

but the rimage repo has not been forked:
https://github.com/zephyrproject-rtos/rimage/

so even configuring a origin remote would not help in this case.

If users want to combine west and git submodules I think it is fair to set a requirement that all submodules must use real urls and not relative paths.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but the rimage repo has not been forked:

That's because Zephyr CI does not need rimage, at least not yet.

I'm pretty sure Zephyr has a requirement that all the code in the default, public west.yml manifest must come from a https://github.com/zephyrproject-rtos/ copy to make sure upstream projects don't come and go and maybe for other reasons. I doubt git submodules create an allowed "loophole", do they?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt git submodules create an allowed "loophole", do they?

I don't think so, but that's not the main point.
Please see here for elaborated reason on why this is bad: #545 (comment)

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.

west update fails on submodules with relative paths
4 participants