summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-07 22:20:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2026-02-27 17:45:06 +0000
commit119ec1b846b0a380474c15dbafac6181a05120a6 (patch)
tree71dcb506687c0f9048f42afaef7ca4b0018cf053 /meta
parentc4da6ca1c2e5d3bdbc78b9e9779071eb50efda71 (diff)
downloadpoky-119ec1b846b0a380474c15dbafac6181a05120a6.tar.gz
go-vendor: Fix absolute paths issue
When building with the class, avoid errors like: "sstate found an absolute path symlink /xxx/vendor pointing at /xxx/import/vendor. Please replace this with a relative link." Use relative symlinks instead. (From OE-Core rev: 2ef214747b648733308958b5750c6c053ac49246) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Thomas Vandenabeele <thomas@bootzero.one> (cherry picked from commit fc4f589cc7a8e5feba7940ccb244a74bd5f96371) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/go-vendor.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/go-vendor.bbclass b/meta/classes/go-vendor.bbclass
index 1bbb99ac79..e58cfaf0e1 100644
--- a/meta/classes/go-vendor.bbclass
+++ b/meta/classes/go-vendor.bbclass
@@ -70,7 +70,7 @@ python do_go_vendor() {
70 if os.path.exists(vendor_dir): 70 if os.path.exists(vendor_dir):
71 # Nothing to do except re-establish link to actual vendor folder 71 # Nothing to do except re-establish link to actual vendor folder
72 if not os.path.exists(linkname): 72 if not os.path.exists(linkname):
73 os.symlink(vendor_dir, linkname) 73 oe.path.relsymlink(vendor_dir, linkname)
74 return 74 return
75 75
76 bb.utils.mkdirhier(vendor_dir) 76 bb.utils.mkdirhier(vendor_dir)
@@ -202,10 +202,10 @@ python do_go_vendor() {
202 symlink_target = os.path.join(source_dir, *['src', go_import, replaced_path]) 202 symlink_target = os.path.join(source_dir, *['src', go_import, replaced_path])
203 symlink_name = os.path.join(vendor_dir, vendored_name) 203 symlink_name = os.path.join(vendor_dir, vendored_name)
204 bb.debug(1, "vendored name %s, symlink name %s" % (vendored_name, symlink_name)) 204 bb.debug(1, "vendored name %s, symlink name %s" % (vendored_name, symlink_name))
205 os.symlink(symlink_target, symlink_name) 205 oe.path.relsymlink(symlink_target, symlink_name)
206 206
207 # Create a symlink to the actual directory 207 # Create a symlink to the actual directory
208 os.symlink(vendor_dir, linkname) 208 oe.path.relsymlink(vendor_dir, linkname)
209} 209}
210 210
211addtask go_vendor before do_patch after do_unpack 211addtask go_vendor before do_patch after do_unpack