Skip to contentSkip to conversation

go-vendor.bbclass: avoid QA errors with absolute paths

PATCH In review Robert Berger 2 participants 4 messages Dec 6, 2024 – Dec 8, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 go-vendor.bbclass: avoid QA errors with absolute paths

avoid QA errors with absolute paths from go-vendor.bbclass

---
 meta/classes/go-vendor.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/go-vendor.bbclass +1 -1
index 38ea69ab50..12667b2d60 100644
@@ -14,7 +14,7 @@
 # folder. Additionally a manifest file is generated for the 'vendor' folder
 # 
 
-inherit go-mod
+inherit go-mod relative_symlinks
 
 def go_src_uri(repo, version, path=None, subdir=None, \
                 vcs='git', replaces=None, pathmajor=None):
Signature · 1 line
2.17.1
#1 lore raw
Quoted 20 lines · Robert Berger via lists.openembedded.org

avoid QA errors with absolute paths from go-vendor.bbclass

Signed-off-by: Robert Berger
<[email protected]>
---
 meta/classes/go-vendor.bbclass | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/go- renamed from meta/classes/go-vendor.bbclass +0 -0

vendor.bbclass
index 38ea69ab50..12667b2d60 100644

meta/classes/go-vendor.bbclass +0 -0
@@ -14,7 +14,7 @@
  # folder. Additionally a manifest file is generated for the 'vendor'

folder
 #

meta/classes/go-vendor.bbclass +1 -1
-inherit go-mod
+inherit go-mod relative_symlinks
Quoted 4 lines


 def go_src_uri(repo, version, path=None, subdir=None, \
                 vcs='git', replaces=None, pathmajor=None):

Can you provide a little more information in the commit message such as the kind of symlink and whether go-vendor always creates these or what the trigger is for the issue? Which tool is creating the symlinks? Was this a change in behaviour of the tool? Could the class create relative symlinks by default rather than fixing them up?

That symlinks class is a heavy hammer and I'm surprised this hasn't come up before now if it is always needed.

Thanks,

Richard

#2 lore raw
Quoted 9 lines · Richard Purdie

Can you provide a little more information in the commit message such as the kind of symlink and whether go-vendor always creates these or what the trigger is for the issue? Which tool is creating the symlinks? Was this a change in behaviour of the tool? Could the class create relative symlinks by default rather than fixing them up?

That symlinks class is a heavy hammer and I'm surprised this hasn't come up before now if it is always needed.

Let me see if I can find some example where I came across this issue.

Quoted 4 lines

Thanks,

Richard

Regards,

Robert

Signature · 11 lines
Robert Berger
Embedded Software Evangelist

Reliable Embedded Systems
Consulting Training Engineering
URL: https://www.reliableembeddedsystems.com

Schedule a web meeting:
https://calendly.com/reliableembeddedsystems/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
#3 lore raw
In reply to Richard Purdie

Hi,

Quoted 33 lines · Richard Purdie
Quoted 19 lines · Robert Berger via lists.openembedded.org

avoid QA errors with absolute paths from go-vendor.bbclass

Signed-off-by: Robert Berger
<[email protected]>

---
  meta/classes/go-vendor.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/go- renamed from meta/classes/go-vendor.bbclass +0 -0

vendor.bbclass
index 38ea69ab50..12667b2d60 100644

meta/classes/go-vendor.bbclass +0 -0
@@ -14,7 +14,7 @@
  # folder. Additionally a manifest file is generated for the 'vendor'

folder
 #

meta/classes/go-vendor.bbclass line 20

Quoted 5 lines
meta/classes/go-vendor.bbclass +1 -1
-inherit go-mod
+inherit go-mod relative_symlinks
 
  def go_src_uri(repo, version, path=None, subdir=None, \
                  vcs='git', replaces=None, pathmajor=None):

Can you provide a little more information in the commit message such as the kind of symlink and whether go-vendor always creates these or what the trigger is for the issue? Which tool is creating the symlinks? Was this a change in behaviour of the tool? Could the class create relative symlinks by default rather than fixing them up?

Quoted 2 lines

That symlinks class is a heavy hammer and I'm surprised this hasn't come up before now if it is always needed.

Here is the example:

https://gitlab.com/meta-layers/meta-yocto-training/-/tree/master/recipes-training/golang-helloworld?ref_type=heads

This is the error without my patch:

ERROR: github.com-robertberger-golangexample-1.0+git-r0 do_populate_sysroot: sstate found an absolute path symlink /workdir/build/multi-v7-ml-debug-training-master/tmp/work/armv7at2hf-neon-resy-linux-gnueabi/github.com-robertberger-golangexample/1.0+git/sysroot-destdir/usr/lib/go/src/github.com/robertberger/golangexample/vendor pointing at /workdir/build/multi-v7-ml-debug-training-master/tmp/work/armv7at2hf-neon-resy-linux-gnueabi/github.com-robertberger-golangexample/1.0+git/git/src/import/vendor. Please replace this with a relative link.

I added it also to:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=15683

Quoted 4 lines

Thanks,

Richard

Signature · 11 lines
Robert Berger
Embedded Software Evangelist

Reliable Embedded Systems
Consulting Training Engineering
URL: https://www.reliableembeddedsystems.com

Schedule a web meeting:
https://calendly.com/reliableembeddedsystems/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--