diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-07 22:20:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-08 12:37:20 +0000 |
commit | c323d56244644964d68e012e688b3339492e50c4 (patch) | |
tree | 62a3b4edcd59f6d75d6d8270b547f750964a797a /meta/classes | |
parent | ef7755749bb10e1f97774405b2695708b6cf36de (diff) | |
download | poky-c323d56244644964d68e012e688b3339492e50c4.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: fc4f589cc7a8e5feba7940ccb244a74bd5f96371)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/go-vendor.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/go-vendor.bbclass b/meta/classes/go-vendor.bbclass index 38ea69ab50..f3268c1125 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 | ||
211 | addtask go_vendor before do_patch after do_unpack | 211 | addtask go_vendor before do_patch after do_unpack |