summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Almqvist <antonal@axis.com>2024-06-12 04:39:07 +0200
committerSteve Sakoman <steve@sakoman.com>2024-06-19 08:34:58 -0700
commit10e6cc830c75a2fd30f7b0efef84cdf614198cfa (patch)
tree5f66a08fff19f28133f4bbc159223c4971ad0558
parent5c20153f7f6d3ec73369ab33f7e44cbaba33fcb6 (diff)
downloadpoky-10e6cc830c75a2fd30f7b0efef84cdf614198cfa.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: 1dc639353658496db5c5df802c0259e87fe2ca0f) 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> (cherry picked from commit fe242408af40dd1f6e47d9b2b232bdc76756c80a) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--scripts/lib/devtool/standard.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 10d0cd3b7c..2beb058de8 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -893,7 +893,10 @@ def modify(args, config, basepath, workspace):
893 (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_revs["."], cwd=srctree) 893 (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_revs["."], cwd=srctree)
894 commits["."] = stdout.split() 894 commits["."] = stdout.split()
895 check_commits = True 895 check_commits = True
896 (stdout, _) = bb.process.run('git submodule --quiet foreach --recursive \'echo `git rev-parse devtool-base` $PWD\'', cwd=srctree) 896 try:
897 (stdout, _) = bb.process.run('git submodule --quiet foreach --recursive \'echo `git rev-parse devtool-base` $PWD\'', cwd=srctree)
898 except bb.process.ExecutionError:
899 stdout = ""
897 for line in stdout.splitlines(): 900 for line in stdout.splitlines():
898 (rev, submodule_path) = line.split() 901 (rev, submodule_path) = line.split()
899 submodule = os.path.relpath(submodule_path, srctree) 902 submodule = os.path.relpath(submodule_path, srctree)