<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15683</bug_id>
          
          <creation_ts>2024-12-06 17:26:46 +0000</creation_ts>
          <short_desc>go-vendor.bbclass: avoid QA errors with absolute paths</short_desc>
          <delta_ts>2026-03-12 15:16:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>5.3</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>5.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Berger">pokylinux</reporter>
          <assigned_to name="Thomas Vandenabeele">thomas</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>thomas</cc>
    
    <cc>yoann.congal</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>100377</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-12-06 17:26:46 +0000</bug_when>
    <thetext></thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100378</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-12-06 17:32:43 +0000</bug_when>
    <thetext>https://lists.openembedded.org/g/openembedded-core/message/208434</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100379</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-12-06 17:33:32 +0000</bug_when>
    <thetext>https://patchwork.yoctoproject.org/project/oe-core/patch/20241206173119.12422-1-Robert.Berger@ReliableEmbeddedSystems.com/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100384</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-12-08 22:52:55 +0000</bug_when>
    <thetext>Example which fails without my patch:

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

Error:

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100422</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-12-12 15:36:34 +0000</bug_when>
    <thetext>Ricahard says that it&apos;s better to avoid creating the incorrect symlinks rather than creating them and then fixing them afterwards.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100437</commentid>
    <comment_count>5</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2024-12-12 20:07:05 +0000</bug_when>
    <thetext>https://bugzilla.yoctoproject.org/show_bug.cgi?id=15683#c3 should explain it, plus my test case.

Please note, that except for the selftests I seem to be the only one using this class in my example:

$ grep --include \*.bb --include \*.inc --include \*.bbclass -r go-vendor .

./meta-yocto-training/recipes-training/golang-helloworld/github.com-robertberger-golangexample_git.bb:inherit go-vendor

Besides, I am not sure how the selftest does not show this issue. Maybe the test case needs to be improved?

&quot;It&apos;s better to avoid creating the incorrect symlinks rather than creating them and then fixing them afterwards&quot;

Yes sure. The question is who creates them? ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100550</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-01-07 22:23:26 +0000</bug_when>
    <thetext>I&apos;ve sent a patch to the list which changes go-vendor to create relative symlinks in the first place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100652</commentid>
    <comment_count>7</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2025-01-15 14:19:48 +0000</bug_when>
    <thetext>Just for completeness, here is the patch:

https://git.yoctoproject.org/poky/commit/meta/classes/go-vendor.bbclass?id=c323d56244644964d68e012e688b3339492e50c4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102172</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-06-05 21:06:13 +0000</bug_when>
    <thetext>https://git.openembedded.org/openembedded-core/commit/?id=fc4f589cc7a8e5feba7940ccb244a74bd5f96371</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104191</commentid>
    <comment_count>9</comment_count>
    <who name="Thomas Vandenabeele">thomas</who>
    <bug_when>2026-02-07 20:10:09 +0000</bug_when>
    <thetext>Is this patch planned to be applied to the scarthgap branch as well?

I ran into the same issue after creating a basic Go recipe using &apos;recipetool create&apos;. I was about to file a bug for this problem, but I noticed that an existing report already addresses it and that it has been fixed upstream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104206</commentid>
    <comment_count>10</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-02-09 19:20:02 +0000</bug_when>
    <thetext>Hi Thomas,

If you think this makes sense as a backport, will you 
please test it and send an email:

https://docs.yoctoproject.org/contributor-guide/submit-changes.html#submitting-changes-to-stable-release-branches

If so, please change the status of this defect. Thanks.

CC-ing Yoann who maintains the stable branches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104307</commentid>
    <comment_count>11</comment_count>
    <who name="Thomas Vandenabeele">thomas</who>
    <bug_when>2026-02-14 16:13:05 +0000</bug_when>
    <thetext>Hello Randy,

I have submitted the patch after test and validation:
https://patchwork.yoctoproject.org/project/oe-core/patch/20260214160806.3043158-1-thomas@bootzero.one/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104611</commentid>
    <comment_count>12</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-03-12 15:16:47 +0000</bug_when>
    <thetext>Fixed by:
https://git.openembedded.org/openembedded-core/commit/?h=scarthgap&amp;id=2ef214747b64</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>