question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

west update fails on submodules with relative paths

See original GitHub issue

When west initializes project repository it only adds remote with name specified in west.yml while git assumes that default remote is origin. Relative submodule paths are resolved to default remote. Without origin remote, west update fails while trying to update repository that contains submodules with relative paths, with following warning

warning: could not look up configuration 'remote.origin.url'. Assuming this repository is its own authoritative upstream.

git logic for resolving relative paths can be found here https://github.com/git/git/blob/v2.20.1/builtin/submodule--helper.c#L135 Manually adding origin remote solves the issue. i’d propose west should also add origin remote to projects by default.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:45 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
mbolivar-nordiccommented, Oct 15, 2021

The problem with #546 is that it breaks a guarantee we have had since the beginning, namely that your working tree’s remotes do not matter to west, and you can change them at will. I tried to explain that in https://github.com/zephyrproject-rtos/west/issues/545#issuecomment-937265242. I should have been clearer; this is a blocker for me.

1reaction
mbolivar-nordiccommented, Oct 15, 2021

There are some pathological examples (see https://datatracker.ietf.org/doc/html/rfc3986.html#section-5.4 and https://www.rfc-editor.org/errata/eid4547) where git does different things, but in normal cases this seems to work fine as far as I can tell, and even the RFC editors don’t seem to have a good handle on the edge cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't add git submodule when specified as a relative path
The submodule helper update_clone called by " git submodule update ", clones submodules if needed. As submodules used to have the URL indicating ......
Read more >
[feature] allow west to report if any of the cloned repositories is ...
west status , as a wrapper around git status , reports status relative to HEAD , not manifest-rev . So its output is...
Read more >
gitmodules fail when using relative path | Bamboo - Jira
gitmodule descriptor, Bamboo, when Bitbucket server repository is created, generates and configures an SSH key on Bitbucket/repository. The problem can be ...
Read more >
West Manifests - Zephyr Project Documentation
Relative path specifying where to clone the repository locally, relative to the top directory in the west workspace.
Read more >
West APIs — Zephyr Project Documentation
This page documents the Python APIs provided by west, as well as some ... repo_path : relative filesystem path to the manifest repository ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found