Openembedded Core Discussions
 help / color / mirror / Atom feed
* [meta][PATCH v3 1/2] go-vendor.bbclass: Unpack into BP for destsuffix
@ 2026-06-22 23:03 John Ripple
  2026-06-22 23:03 ` [meta][PATCH v3 2/2] go-vendor.bbclass: Remove vendor symlink John Ripple
  0 siblings, 1 reply; 2+ messages in thread
From: John Ripple @ 2026-06-22 23:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: John Ripple

The go-vendor class has a hardcoded destsuffix variable used to unpack
sources fetched with the go_src_uri function. This was causing a conflict
with insane.bbclass which prohibts setting S = "${UNPACKDIR}/git" which
was needed to find the vendored sources in the hardcoded location.
Changing this unpack location to use the standard base package name (BP)
fixes the previous issue and no longer requires manually setting S in the
recipes that use go-vendor.

Signed-off-by: John Ripple <john.ripple@keysight.com>
---
 meta/classes/go-vendor.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/go-vendor.bbclass b/meta/classes/go-vendor.bbclass
index 6ec6178add..f854d14bdf 100644
--- a/meta/classes/go-vendor.bbclass
+++ b/meta/classes/go-vendor.bbclass
@@ -19,7 +19,7 @@ inherit go-mod
 def go_src_uri(repo, version, path=None, subdir=None, \
                 vcs='git', replaces=None, pathmajor=None):
 
-    destsuffix = "git/src/import/vendor.fetch"
+    destsuffix = "${BP}/src/import/vendor.fetch"
     module_path = repo if not path else path
 
     src_uri = "{}://{};name={}".format(vcs, repo, module_path.replace('/', '.'))
@@ -58,7 +58,8 @@ python do_go_vendor() {
     if not src_uri:
         bb.fatal("SRC_URI is empty")
 
-    default_destsuffix = "git/src/import/vendor.fetch"
+    base_package = d.getVar('BP')
+    default_destsuffix = "{}/src/import/vendor.fetch".format(base_package)
     fetcher = bb.fetch2.Fetch(src_uri, d)
     go_import = d.getVar('GO_IMPORT')
     source_dir = d.getVar('S')


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-22 23:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 23:03 [meta][PATCH v3 1/2] go-vendor.bbclass: Unpack into BP for destsuffix John Ripple
2026-06-22 23:03 ` [meta][PATCH v3 2/2] go-vendor.bbclass: Remove vendor symlink John Ripple

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox