diff options
author | Anton Almqvist <antonal@axis.com> | 2024-05-14 11:56:23 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-15 16:39:19 +0100 |
commit | 9a894dac19ffc6251d3bde4a8c91041ba5fda386 (patch) | |
tree | 2f8ef3985ebe56636ac5170daf14bc356226893a /scripts/lib | |
parent | 7c211b1803d476b860249521c5b8aa079fb85919 (diff) | |
download | poky-9a894dac19ffc6251d3bde4a8c91041ba5fda386.tar.gz |
devtool: modify: Catch git submodule error for go code
One of the git submodule commands failed for source extracted for
recipes using go.bbclass. The root cause is probably the path set up
by go_do_unpack which makes S and gitroot not match.
This patch does not fix the root problem, but at least it is no worse
than before the git submodule support.
The extracted source will still have two .git folders, one in S
created by devtool and one in the go path which will contain the tru
git history.
[ YOCTO #15483 ]
(From OE-Core rev: fe242408af40dd1f6e47d9b2b232bdc76756c80a)
Signed-off-by: Anton Almqvist <antonal@axis.com>
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/devtool/standard.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index bd009f44b1..05161942b7 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -904,7 +904,10 @@ def modify(args, config, basepath, workspace): | |||
904 | (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_revs["."], cwd=srctree) | 904 | (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_revs["."], cwd=srctree) |
905 | commits["."] = stdout.split() | 905 | commits["."] = stdout.split() |
906 | check_commits = True | 906 | check_commits = True |
907 | (stdout, _) = bb.process.run('git submodule --quiet foreach --recursive \'echo `git rev-parse devtool-base` $PWD\'', cwd=srctree) | 907 | try: |
908 | (stdout, _) = bb.process.run('git submodule --quiet foreach --recursive \'echo `git rev-parse devtool-base` $PWD\'', cwd=srctree) | ||
909 | except bb.process.ExecutionError: | ||
910 | stdout = "" | ||
908 | for line in stdout.splitlines(): | 911 | for line in stdout.splitlines(): |
909 | (rev, submodule_path) = line.split() | 912 | (rev, submodule_path) = line.split() |
910 | submodule = os.path.relpath(submodule_path, srctree) | 913 | submodule = os.path.relpath(submodule_path, srctree) |