<?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>1075</bug_id>
          
          <creation_ts>2011-05-17 00:55:56 +0000</creation_ts>
          <short_desc>sstate should exclude more variables for packages with PACKAGE_ARCH = &quot;all&quot;</short_desc>
          <delta_ts>2011-11-16 09:49:09 +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>Meta-yocto</product>
          <component>meta-yocto</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>Final patch out for review on mailing list</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>dvhart</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>13850</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2011-05-17 00:55:56 +0000</bug_when>
    <thetext>If you have package with
PACKAGE_ARCH = &quot;all&quot;
then the resulting package is created by run.* scripts with different
paths, *FLAGS etc even when it produces same output (ie some theme).

So all packages with such PACKAGE_ARCH are rebuilt after machine switch
(if the machine is ie different arch like om-gta02/nokia900).
Sstate is reused when you go back to om-gta02 after building nokia900,
so you have ie populate_sysroot only with as many checksums as you&apos;re
building different archs, but it still makes &quot;all&quot; as PACKAGE_ARCH less usefull.

RP said, that right fix is to introduce something like all.bbclass which
excludes all variables which shouldn&apos;t change the output of such package
and then checksums will be the same.

There is example with gtk-theme-e17lookalike from meta-shr layer in attachment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13851</commentid>
    <comment_count>1</comment_count>
      <attachid>156</attachid>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2011-05-17 00:56:51 +0000</bug_when>
    <thetext>Created attachment 156
bitbake-diffsig example with gtk-theme-e17lookalike</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14061</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2011-05-28 02:42:08 +0000</bug_when>
    <thetext>Current status is tracked in following branches:

http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/allarch
http://cgit.openembedded.org/cgit.cgi/meta-openembedded-contrib/log/?h=jansa/allarch

Last issue left is using allarch.bbclass and debian.bbclass.
debian.bbclass is renaming packages for runtime so if recipe has
task-fso2-compliance.bb:
RDEPENDS_${PN} = &quot;libfsotransport&quot;
it needs to know what is runtime name for libfsotransport.

That&apos;s why package.bbclass is calling runtime_mapping_rename for all runtime vars in control file.
runtime_mapping_rename calls oe.packagedata.read_subpkgdata in 
meta/lib/oe/packagedata.py and important fce is this

def get_subpkgedata_fn(pkg, d):
    archs = bb.data.expand(&quot;${PACKAGE_ARCHS}&quot;, d).split(&quot; &quot;)
    archs.reverse()
    pkgdata = bb.data.expand(&apos;${TMPDIR}/pkgdata/&apos;, d)
    targetdir = bb.data.expand(&apos;${TARGET_VENDOR}-${TARGET_OS}/runtime/&apos;, d)
    bb.note(&quot;archs %s&quot; % archs)
    for arch in archs:
        fn = pkgdata + arch + targetdir + pkg
        if os.path.exists(fn):
            bb.note(&quot;found %s&quot; % fn)
            return fn
    bb.note(&quot;returning %s&quot; % bb.data.expand(&apos;${PKGDATA_DIR}/runtime/%s&apos; % pkg, d))
    return bb.data.expand(&apos;${PKGDATA_DIR}/runtime/%s&apos; % pkg, d)

PACKAGE_ARCHS is different for each arch
om-gta02: PACKAGE_ARCHS=&quot;all any noarch arm armv4 armv4t om_gta02&quot;
nokia900: PACKAGE_ARCHS=&quot;all any noarch arm armv4 armv4t armv5te armv6 armv7 armv7a nokia900&quot;

and file we&apos;re looking for is in tmp/pkgdata
all-oe-linux
all-oe-linux-gnueabi
armv4t-oe-linux-gnueabi
armv7a-oe-linux-gnueabi
nokia900-oe-linux
nokia900-oe-linux-gnueabi
om_gta02-oe-linux
om_gta02-oe-linux-gnueabi

for libfsotransport:
$ find tmp/pkgdata/ -path \*runtime\* -name libfsotransport
tmp/pkgdata/armv7a-oe-linux-gnueabi/runtime/libfsotransport
tmp/pkgdata/armv4t-oe-linux-gnueabi/runtime/libfsotransport

Problem with allarch is, that we have correctly lost -gnueabi postfix. PACKAGE_ARCH = &quot;all&quot; alone had TARGET_OS = &quot;linux-gnueabi&quot;, allarch has TARGET_OS = &quot;linux&quot;.

get_subpkgedata_fn is looking for files only with the same TARGET_OS so it cannot find libfsotransport and returns default
bb.data.expand(&apos;${PKGDATA_DIR}/runtime/%s&apos; % pkg, d)
which doesn&apos;t exist and libfsotransport isn&apos;t renamed to libfsotransport0

Right fix is not so simple because imagine this scenario.
1) libfsotransport is upgraded to version 2.0 and soname changes to libfsotransport2
2) image is built for nokia900
3) task-fso2-compliance still RDEPENDS on libfsotransport0
4) someone finds that task-fso2-compliance is wrong and rebuilds it still with nokia900 machine
5) task-fso2-compliance now depends on libfsotransport2 but armv4t feeds doesn&apos;t have it (still only libfsotransport0)
6) if someone rebuilds task-fso2-compliance again it will rdepends on libfsotransport0 and break feeds for nokia900

I don&apos;t know how to fix this to be 100% correct. 

Publishing feeds only after all archs/machines were already build makes things better.

Using allarch only for recipes which don&apos;t depend on any MACHINE_ARCH/FEED_ARCH packages is also way to go, but makes allarch usable only in few special cases.

Any thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14076</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-05-31 05:05:22 +0000</bug_when>
    <thetext>Marking task-* packages as &quot;allarch&quot; has never been a good idea for exactly this reason and the problem occurs without allarch as you mention, it it perhaps just more hidden.

In general task-* packages end up being at least target arch specific and sometimes even machine specific. I think we just have to accept that is the case...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14077</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-05-31 05:08:29 +0000</bug_when>
    <thetext>http://git.openembedded.net/cgit.cgi/openembedded-core/commit/?id=26e5e5feb695864b11e47e24017e254c28f14494 has some initial changes to start to address this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16780</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-10-07 06:09:22 +0000</bug_when>
    <thetext>To update on the status of this bug, we&apos;re down to 5 potentially bad allarch references in OE-Core:

meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.12.bb:PACKAGE_ARCH = &quot;all&quot;
meta/recipes-extended/perl/libconvert-asn1-perl_0.22.bb:PACKAGE_ARCH = &quot;all&quot;
meta/recipes-extended/perl/libtimedate-perl_1.20.bb:PACKAGE_ARCH = &quot;all&quot;
meta/recipes-devtools/update-alternatives/update-alternatives-dpkg.inc:PACKAGE_ARCH = &quot;all&quot;
meta/recipes-graphics/xorg-font/font-alias_1.0.3.bb:PACKAGE_ARCH = &quot;all&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16782</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-10-07 06:25:33 +0000</bug_when>
    <thetext>There are WIP patches for some of these at:

http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/allarch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17210</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-15 08:13:38 +0000</bug_when>
    <thetext>This is now reduced to the following two recipes:

meta/recipes-extended/perl/libconvert-asn1-perl_0.22.bb:PACKAGE_ARCH = &quot;all&quot;
meta/recipes-extended/perl/libtimedate-perl_1.20.bb:PACKAGE_ARCH = &quot;all&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17229</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-16 09:49:09 +0000</bug_when>
    <thetext>Final fix merged in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=d6663c342e61473937e6a5a7976324c7c07252c8</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>156</attachid>
            <date>2011-05-17 00:56:51 +0000</date>
            <delta_ts>2011-05-17 00:56:51 +0000</delta_ts>
            <desc>bitbake-diffsig example with gtk-theme-e17lookalike</desc>
            <filename>diff.txt</filename>
            <type>text/plain</type>
            <size>4029</size>
            <attacher name="Martin Jansa">Martin.Jansa</attacher>
            
              <data encoding="base64">T0UgQCB+L3Noci1jb3JlICQgYml0YmFrZS1kaWZmc2lncyBzc3RhdGUtY2FjaGUvc3N0YXRlLWd0
ay10aGVtZS1lMTdsb29rYWxpa2UtYWxsLWxpbnV4LWdudWVhYmktMC4xLjErZ2l0cjMrOWI5MmEz
ZDA5NWVmMWI1M2Y1NTAyNmNjMjkyNzcxZDE1MDdlNjgwMC1yOC1hbGwtMi0qcG9wdWxhdGUtc3lz
cm9vdCpzaWdpbmZvCmJhc2VoYXNoIGNoYW5nZWQgZnJvbSBkY2ZjYjk1ODQxMWU4NjUzZTE2MGQw
N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