<?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>11449</bug_id>
          
          <creation_ts>2017-05-03 16:31:32 +0000</creation_ts>
          <short_desc>Allow overriding classes to override overridden classes</short_desc>
          <delta_ts>2021-08-04 21:56:42 +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>2.3</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>enhancement</bug_severity>
          <target_milestone>3.4 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>73008</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-05-03 16:31:32 +0000</bug_when>
    <thetext>devupstream is great, but it can&apos;t work on native recipes.  We should try and fix that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79606</commentid>
    <comment_count>1</comment_count>
    <who name="Robin Jordan">robin.l.jordan</who>
    <bug_when>2018-02-26 20:40:05 +0000</bug_when>
    <thetext>Please provide a status update to this.  Will it make it into YP 2.5 M3?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80579</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-05-15 08:51:15 +0000</bug_when>
    <thetext>Changing title and reassigning to RP.

Context: devupstream is a class which creates new recipes which use git AUTOREV SRC_URI instead of tarballs.  However to work for BBCLASSEXTEND&apos;d native recipes, it needs to be able to see and override the native form.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91097</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-08-04 11:52:53 +0000</bug_when>
    <thetext>I had a play with this and after much experimentation, I found this which worked:

diff --git a/meta/classes/devupstream.bbclass b/meta/classes/devupstream.bbclass
index 1230fa12ea7..f6d0c88212a 100644
--- a/meta/classes/devupstream.bbclass
+++ b/meta/classes/devupstream.bbclass
@@ -25,23 +25,30 @@ python devupstream_virtclass_handler () {
         return
 
     variant = d.getVar(&quot;BBEXTENDVARIANT&quot;)
-    if variant not in (&quot;target&quot;):
-        bb.error(&quot;Pass the variant when using devupstream, for example devupstream:target&quot;)
-        return
+    #if variant not in (&quot;target&quot;):
+    #    bb.error(&quot;Pass the variant when using devupstream, for example devupstream:target&quot;)
+    #    return
 
     # Develpment releases are never preferred by default
     d.setVar(&quot;DEFAULT_PREFERENCE&quot;, &quot;-1&quot;)
 
     uri = bb.fetch2.URI(d.getVar(&quot;SRC_URI&quot;).split()[0])
 
-    if uri.scheme == &quot;git&quot;:
-        d.setVar(&quot;S&quot;, &quot;${WORKDIR}/git&quot;)
+    #if uri.scheme == &quot;git&quot;:
+    #    d.setVar(&quot;S&quot;, &quot;${WORKDIR}/git&quot;)
 
     # Modify the PV if the recipe hasn&apos;t already overridden it
     pv = d.getVar(&quot;PV&quot;)
     proto_marker = &quot;+&quot; + uri.scheme
     if proto_marker not in pv:
         d.setVar(&quot;PV&quot;, pv + proto_marker + &quot;${SRCPV}&quot;)
+
+    if variant == &quot;native&quot;:
+        pn = d.getVar(&quot;PN&quot;)
+        d.setVar(&quot;PN&quot;, &quot;%s-native&quot; % (pn))
+        fn = d.getVar(&quot;FILE&quot;)
+        bb.parse.BBHandler.inherit(&quot;native&quot;, fn, 0, d)
+        d.appendVar(&quot;CLASSOVERRIDE&quot;, &quot;:class-devupstream&quot;)
 }
 
 addhandler devupstream_virtclass_handler
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
index 296bc68d412..c9c6b77565f 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
@@ -68,3 +68,21 @@ RDEPENDS:${PN}-ptest += &quot;make bash&quot;
 
 PROVIDES:append:class-native = &quot; bzip2-replacement-native&quot;
 BBCLASSEXTEND = &quot;native nativesdk&quot;
+
+
+
+
+BBCLASSEXTEND += &quot;devupstream:target devupstream:native&quot;
+SRC_URI:class-devupstream = &quot;git://sourceware.org/git/bzip2.git;name=main;destsuffix=bzip2-1.0.8 \
+           git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests \
+           file://configure.ac;subdir=bzip2-1.0.8 \
+           file://Makefile.am;subdir=bzip2-1.0.8 \
+           file://run-ptest \
+&quot;
+
+DEFAULT_PREFERENCE:class-devupstream = &quot;-1&quot;
+SRCREV_main:class-devupstream = &quot;8ca1faa31f396d94ab927b257f3a05236c84e330&quot;
+PV:class-devupstream = &quot;1.0.8+git${SRCPV}&quot;
+S:class-devupstream = &quot;${WORKDIR}/bzip2-1.0.8&quot;
+SRCREV_FORMAT = &quot;main_bzip2-tests&quot;
+</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91100</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-08-04 13:11:13 +0000</bug_when>
    <thetext>Patch on mailing list</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91113</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-08-04 21:56:42 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=1900cb43f1f9f81abbef4fa1416a4057500aa19c</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>