<?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>7984</bug_id>
          
          <creation_ts>2015-07-09 21:04:21 +0000</creation_ts>
          <short_desc>RPM backend does not honor package overrides for PACKAGE_ARCH</short_desc>
          <delta_ts>2026-04-30 15:03:50 +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>deployment</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>ACCEPTED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard> </status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Randy Witt">randy.e.witt</reporter>
          <assigned_to name="Yi Zhao">yi.zhao</assigned_to>
          <cc>liezhi.yang</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>mathieu.dubois-briand</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>yi.zhao</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>52263</commentid>
    <comment_count>0</comment_count>
      <attachid>2582</attachid>
    <who name="Randy Witt">randy.e.witt</who>
    <bug_when>2015-07-09 21:04:21 +0000</bug_when>
    <thetext>Created attachment 2582
Recipe that will demonstrate the bug

Using master as of 48b5ea6782ec7e9ab8f9a28438ef0ededa5fe224, if you use a package overrides as part of PACKAGE_ARCH when using the rpm backend. The override is not honored.

I&apos;ve attached a recipe that will produce the problem. Using the attached recipe one would expect that package-b would be have architecture of &quot;all&quot; in the rpm metadata, however it ends up being equal to the default. i.e. TUNE_PKGARCH

This problem does not occur when using ipk. The ipk backend overrides the PACKAGE_ARCH for package-b as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52269</commentid>
    <comment_count>1</comment_count>
      <attachid>2583</attachid>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-07-10 07:57:13 +0000</bug_when>
    <thetext>Created attachment 2583
Attempt to fix this issue</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52270</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-07-10 07:58:03 +0000</bug_when>
    <thetext>Trouble is when you run this, you see:
| DEBUG: Executing shell function BUILDSPEC
| error: line 11: Only &quot;noarch&quot; sub-packages are supported: BuildArch: all
| error: Package has no %description: test2-1.0-r0.0.all
| Building target platforms: core2_32-poky-linux


i.e. rpm only supports noarch subpackages.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52439</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-07-16 14:39:52 +0000</bug_when>
    <thetext>At the very least we should put a sanity check into package_rpm so that if this scenario comes about, it will error rather than silently &quot;work&quot; and do the wrong thing.

Once that is done, the bug can be pushed out into Future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52491</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2015-07-20 18:19:01 +0000</bug_when>
    <thetext>In the past RPM did not support generating &quot;noarch&quot; (equivalent to all) packages from within a spec file that had arch specific items.

We should check if this is now supported and modify the spec file generated to match.  If it is not supported, we&apos;ll need to generate an error or warning that something unsupported is being attempted.  (The alternative implementation is to break up the packaging into multiple steps.  Once for each specified arch.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59105</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2016-02-16 15:06:03 +0000</bug_when>
    <thetext>At a minimum a warning or something similar should be implemented in the RPM backend to make it clear what will happen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69614</commentid>
    <comment_count>6</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2017-01-09 08:53:58 +0000</bug_when>
    <thetext>I think a warning is sufficient. Two reasons below.

1) When such a rare case is encountered, just warn the user and ask him to split the recipe into multiple ones. I think it&apos;s cleaner than generating multiple rpm spec files for one recipe.
2) I searched OE and meta-openembedded repo, no such case. If we change the rpm backend logic for a case which could not be found in all our repos, isn&apos;t it a little weird?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85591</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2019-11-21 16:10:40 +0000</bug_when>
    <thetext>Yi can you work on this for 3.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105314</commentid>
    <comment_count>8</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-30 15:03:50 +0000</bug_when>
    <thetext>Did we ever had the warning?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2582</attachid>
            <date>2015-07-09 21:04:21 +0000</date>
            <delta_ts>2015-07-09 21:04:21 +0000</delta_ts>
            <desc>Recipe that will demonstrate the bug</desc>
            <filename>overrides-bug.bb</filename>
            <type>application/octet-stream</type>
            <size>285</size>
            <attacher name="Randy Witt">randy.e.witt</attacher>
            
              <data encoding="base64">U1VNTUFSWSA9ICJHZW5lcmF0ZXMgcGFja2FnZSB0byBiZSBpbnN0YWxsZWQgZnJvbSB0aGUgcGFj
a2FnZSBmZWVkIgpMSUNFTlNFID0gIk1JVCIKTElDX0ZJTEVTX0NIS1NVTSA9ICJmaWxlOi8vJHtD
T01NT05fTElDRU5TRV9ESVJ9L01JVDttZDU9MDgzNWFkZTY5OGUwYmNmODUwNmVjZGEyZjdiNGYz
MDIiCgpBTExPV19FTVBUWV8ke1BOfSA9ICIxIgpBTExPV19FTVBUWV9wYWNrYWdlLWIgPSAiMSIK
ClBBQ0tBR0VTICs9ICJwYWNrYWdlLWIiCgpQQUNLQUdFX0FSQ0hfcGFja2FnZS1iID0gImFsbCIK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2583</attachid>
            <date>2015-07-10 07:57:13 +0000</date>
            <delta_ts>2015-07-10 07:57:13 +0000</delta_ts>
            <desc>Attempt to fix this issue</desc>
            <filename>rpmsubarch.patch</filename>
            <type>text/plain</type>
            <size>1670</size>
            <attacher name="Richard Purdie">richard.purdie</attacher>
            
              <data encoding="base64">RnJvbSBhMzg3YWMxZjdkZjQ3NjUxNTEzNThiOGU1NzM1NDhlZDA5ZDQ4NTRmIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBSaWNoYXJkIFB1cmRpZSA8cmljaGFyZC5wdXJkaWVAbGludXhm
b3VuZGF0aW9uLm9yZz4KRGF0ZTogVGh1LCA5IEp1bCAyMDE1IDIwOjU2OjMyICswMDAwClN1Ympl
Y3Q6IHBhY2thZ2VfcnBtOiBTdXBwb3J0IGRpZmZlcmVudCBzdWIgcGFja2FnZSBhcmNoCgpTaWdu
ZWQtb2ZmLWJ5OiBSaWNoYXJkIFB1cmRpZSA8cmljaGFyZC5wdXJkaWVAbGludXhmb3VuZGF0aW9u
Lm9yZz4KCmRpZmYgLS1naXQgYS9tZXRhL2NsYXNzZXMvcGFja2FnZV9ycG0uYmJjbGFzcyBiL21l
dGEvY2xhc3Nlcy9wYWNrYWdlX3JwbS5iYmNsYXNzCmluZGV4IDI3MWI5YWUuLjJ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QogICAg
ICAgICBzcGxpdHJlbGVhc2UgPSAobG9jYWxkYXRhLmdldFZhcignUEtHUicsIFRydWUpIG9yICIi
KQpAQCAtNTUwLDYgKzU1Myw4IEBAIHB5dGhvbiB3cml0ZV9zcGVjZmlsZSAoKSB7CiAKICAgICBw
cmludF9kZXBzKHNyY2RlcGVuZHMsICJCdWlsZFJlcXVpcmVzIiwgc3BlY19wcmVhbWJsZV90b3As
IGQpCiAgICAgcHJpbnRfZGVwcyhzcmNyZGVwZW5kcywgIlJlcXVpcmVzIiwgc3BlY19wcmVhbWJs
ZV90b3AsIGQpCisgICAgaWYgc3BsaXRwa2dhcmNoICE9IHNyY3BrZ2FyY2g6CisgICAgICAgIHNw
ZWNfcHJlYW1ibGVfdG9wLmFwcGVuZCgnQnVpbGRBcmNoOiAlcycgJSBzcGxpdHBrZ2FyY2gpCiAg
ICAgaWYgc3JjcnByZWluc3Q6CiAgICAgICAgIHByaW50X2RlcHMoc3JjcmRlcGVuZHMsICJSZXF1
aXJlcyhwcmUpIiwgc3BlY19wcmVhbWJsZV90b3AsIGQpCiAgICAgaWYgc3JjcnBvc3RpbnN0Ogot
LSAKY2dpdCB2MC4xMC4yCgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>