From: <olani@axis.com>
To: <openembedded-core@lists.openembedded.org>
Cc: <olani@axis.com>
Subject: [PATCH] devtool: modify: Catch git submodule error for go code
Date: Tue, 14 May 2024 11:56:23 +0200 [thread overview]
Message-ID: <20240514095623.3951836-1-olani@axis.com> (raw)
From: Anton Almqvist <antonal@axis.com>
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 ]
Signed-off-by: Anton Almqvist <antonal@axis.com>
Signed-off-by: Ola x Nilsson <olani@axis.com>
---
scripts/lib/devtool/standard.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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):
(stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_revs["."], cwd=srctree)
commits["."] = stdout.split()
check_commits = True
- (stdout, _) = bb.process.run('git submodule --quiet foreach --recursive \'echo `git rev-parse devtool-base` $PWD\'', cwd=srctree)
+ try:
+ (stdout, _) = bb.process.run('git submodule --quiet foreach --recursive \'echo `git rev-parse devtool-base` $PWD\'', cwd=srctree)
+ except bb.process.ExecutionError:
+ stdout = ""
for line in stdout.splitlines():
(rev, submodule_path) = line.split()
submodule = os.path.relpath(submodule_path, srctree)
--
2.39.2
next reply other threads:[~2024-05-14 9:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 9:56 olani [this message]
2024-05-15 17:55 ` [OE-core] [PATCH] devtool: modify: Catch git submodule error for go code Peter Kjellerstedt
2024-05-15 18:33 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240514095623.3951836-1-olani@axis.com \
--to=olani@axis.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).