On Wed, 2024-05-15 at 17:55 +0000, Peter Kjellerstedt via 
lists.openembedded.org wrote:
> Steve, please cherry-pick this to Scarthgap.
> 
> //Peter
> 
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org 
> > <openembedded-core@lists.openembedded.org> On Behalf Of Ola x Nilsson
> > Sent: den 14 maj 2024 11:56
> > To: openembedded-core@lists.openembedded.org
> > Cc: Ola x Nilsson <ola.x.nils...@axis.com>
> > Subject: [OE-core] [PATCH] devtool: modify: Catch git submodule error for 
> > go code
> > 
> > From: Anton Almqvist <anto...@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 <anto...@axis.com>
> > Signed-off-by: Ola x Nilsson <ol...@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)

FWIW I was in two minds whether to merge this. Making things silently
ignore failures is bad and by merging it I've removed any leverage I
had on trying to get this fixed properly. There is also no test case.

I only merged it as I can't face yet another discussion/argument about
why we should try and do things properly. Nobody else appears to want
to do this kind of review or push for that kind of quality and I'm
growing weary of trying :(

Cheers,

Richard





-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199425): 
https://lists.openembedded.org/g/openembedded-core/message/199425
Mute This Topic: https://lists.openembedded.org/mt/106091660/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to