<?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>15692</bug_id>
          
          <creation_ts>2024-12-13 20:02:08 +0000</creation_ts>
          <short_desc>BBCLASSEXTEND doesn&apos;t handle overrides with suffixed ${PN} for native class</short_desc>
          <delta_ts>2025-03-11 16:32:11 +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>unspecified</version>
          <rep_platform>x86</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>normal</bug_severity>
          <target_milestone>5.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Denys Dmytriyenko">denis</reporter>
          <assigned_to name="Christos Gavros">gavrosc</assigned_to>
          <cc>gavrosc</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</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>100443</commentid>
    <comment_count>0</comment_count>
    <who name="Denys Dmytriyenko">denis</who>
    <bug_when>2024-12-13 20:02:08 +0000</bug_when>
    <thetext>BBCLASSEXTEND doesn&apos;t handle overrides with suffixed ${PN} for
native class

More details in the discussion on the list:
https://lists.openembedded.org/g/openembedded-core/topic/109930389#msg208471</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100536</commentid>
    <comment_count>1</comment_count>
    <who name="Christos Gavros">gavrosc</who>
    <bug_when>2025-01-06 09:57:07 +0000</bug_when>
    <thetext>Hi

I ran some tests and my conclusions are:

- I applied the proposed patch but didnt work. The vim native related package that is generated is called ‘vim-native’ in the location /build/tmp/work/x86_64-linux. I couldn&apos;t find any packages called &apos;vim-native-xxd&apos; or &apos;vim-xxd-native&apos;

- I tried the following solution and worked without errors. It is not a proper solution, just to understand how the mechanism works.
In vim recipe i added the line  RPROVIDES:${PN} =&quot;xxd-native&quot;
In another recipe i added the line RDEPENDS:${PN} += &quot;xxd-native&quot;

- I tried to add code in native.bbclass to set a value to RPROVIDES:vim-native = “xxd-native” in order to avoid any changes in the recipes (and then find a general solution later). I got the same error.

- I tested the same case with other recipes like &apos;atk-native&apos; and &apos;kbd-native&apos;. Both failed as vim.

- The error is generated at the end of the build procedure when the task “do_rootfs” is running for the             image at all of the above occasions.

Is it supposed that recipes can use RDEPENDS (e.g. RDEPENDS:${PN} += &quot;packageName-native&quot;) to native packages of other recipes ? 

Has this been tested in the past?

Br
Christos</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100537</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-01-06 14:31:34 +0000</bug_when>
    <thetext>I replied to the list with a different patch which changes the native.bbclass extension code to better handle this corner case. It does create new issues though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100538</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-01-06 14:34:15 +0000</bug_when>
    <thetext>(In reply to Christos Gavros from comment #1)
&gt; I ran some tests and my conclusions are:
&gt; 
&gt; - I applied the proposed patch but didnt work. The vim native related
&gt; package that is generated is called ‘vim-native’ in the location
&gt; /build/tmp/work/x86_64-linux. I couldn&apos;t find any packages called
&gt; &apos;vim-native-xxd&apos; or &apos;vim-xxd-native&apos;
&gt; 
&gt; - I tried the following solution and worked without errors. It is not a
&gt; proper solution, just to understand how the mechanism works.
&gt; In vim recipe i added the line  RPROVIDES:${PN} =&quot;xxd-native&quot;
&gt; In another recipe i added the line RDEPENDS:${PN} += &quot;xxd-native&quot;
&gt; 
&gt; - I tried to add code in native.bbclass to set a value to
&gt; RPROVIDES:vim-native = “xxd-native” in order to avoid any changes in the
&gt; recipes (and then find a general solution later). I got the same error.
&gt; 
&gt; - I tested the same case with other recipes like &apos;atk-native&apos; and
&gt; &apos;kbd-native&apos;. Both failed as vim.
&gt; 
&gt; - The error is generated at the end of the build procedure when the task
&gt; “do_rootfs” is running for the             image at all of the above
&gt; occasions.
&gt; 
&gt; Is it supposed that recipes can use RDEPENDS (e.g. RDEPENDS:${PN} +=
&gt; &quot;packageName-native&quot;) to native packages of other recipes ? 
&gt; 
&gt; Has this been tested in the past?

It is intended that if a recipe has:

RDEPENDS:${PN}-xxx = &quot;yyy&quot;

then a native version of the recipe would have a dependency on yyy-native added.

As you say, native recipes don&apos;t have packages but they do have dependencies for their populate_sysroot task (which is where a native would get run).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100540</commentid>
    <comment_count>4</comment_count>
    <who name="Christos Gavros">gavrosc</who>
    <bug_when>2025-01-06 19:51:11 +0000</bug_when>
    <thetext>So, we can not have in a recipe the following statement, right ?

RDEPENDS:${PN}-xxx = “yyy-native” 

We can not use RDEPENDS between a runtime package of recipe ‘A’ and the native package of recipe ‘B’, is that right? 
If we use RDEPENDS for the runtime packages then the dependency for equivalent native recipes shall be implied</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100541</commentid>
    <comment_count>5</comment_count>
    <who name="Denys Dmytriyenko">denis</who>
    <bug_when>2025-01-06 20:04:11 +0000</bug_when>
    <thetext>(In reply to Christos Gavros from comment #4)
&gt; So, we can not have in a recipe the following statement, right ?
&gt; 
&gt; RDEPENDS:${PN}-xxx = “yyy-native” 
&gt; 
&gt; We can not use RDEPENDS between a runtime package of recipe ‘A’ and the
&gt; native package of recipe ‘B’, is that right? 
&gt; If we use RDEPENDS for the runtime packages then the dependency for
&gt; equivalent native recipes shall be implied

https://docs.yoctoproject.org/ref-manual/variables.html#term-BBCLASSEXTEND

BBCLASSEXTEND is supposed to handle all this automatically, hence the issue...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100546</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-01-07 13:06:34 +0000</bug_when>
    <thetext>(In reply to Christos Gavros from comment #4)
&gt; So, we can not have in a recipe the following statement, right ?
&gt; 
&gt; RDEPENDS:${PN}-xxx = “yyy-native” 
&gt; 
&gt; We can not use RDEPENDS between a runtime package of recipe ‘A’ and the
&gt; native package of recipe ‘B’, is that right? 
&gt; If we use RDEPENDS for the runtime packages then the dependency for
&gt; equivalent native recipes shall be implied

Such a requirement doesn&apos;t make sense, no.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101344</commentid>
    <comment_count>7</comment_count>
    <who name="Christos Gavros">gavrosc</who>
    <bug_when>2025-03-11 16:32:11 +0000</bug_when>
    <thetext>the patch is merged in master:

https://git.openembedded.org/openembedded-core/commit/?id=e2fd81e221c25fc21d532e020ddd8aaac0c22ede</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>