Skip to content
Commit f25cc92c authored by Martin Jansa's avatar Martin Jansa Committed by Richard Purdie
Browse files

dummy-sdk-package.inc: work around MACHINE_ARCH SSTATE_MANMACH



* since following change:
  allarch: only enable allarch when multilib is	not used
  the sstate-diff-machines.sh reports different signature for target-sdk-provides-dummy
  when multilib is enabled

 === Comparing signatures for task do_populate_sysroot.sigdata between qemux86 and qemux86copy ===
ERROR: lib32-target-sdk-provides-dummy different signature for task do_populate_sysroot.sigdata between qemux86 and qemux86copy
basehash changed from b0a44b2c7003b6b4aa3a023d9cb9fe82 to 3a59fa25ddb6a95aff079d477ebf3457
Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

ERROR: target-sdk-provides-dummy different signature for task do_populate_sysroot.sigdata between qemux86 and qemux86copy
basehash changed from 9e44f1deb3d15886ee96db1a3332764c to 6b417d08a5113c9b06d13b3681f5ab4f
Variable SSTATE_MANMACH value changed from 'qemux86' to 'qemux86copy'

It's using:
inherit allarch

python() {
    # Put the package somewhere separate to ensure it's never used except
    # when we want it
    # (note that we have to do this in anonymous python here to avoid
    # allarch.bbclass disabling itself)
    d.setVar('PACKAGE_ARCH', '${DUMMYARCH}')
}

and DUMMYARCH = "sdk-provides-dummy-target"

The difference as shown with bitbake -e before and after reverting allarch.bbclass commit:

before revert:
   $SSTATE_MANMACH [2 operations]
     set? oe-core/meta/classes/sstate.bbclass:61
       "${SSTATE_PKGARCH}"
     set sstate.bbclass:100 [__anon_111_oe_core_meta_classes_sstate_bbclass]
       "machineName"
   pre-expansion value:
     "machineName"
SSTATE_MANMACH="machineName"

   $SSTATE_PKGARCH
     set oe-core/meta/classes/sstate.bbclass:11
       "${PACKAGE_ARCH}"
SSTATE_PKGARCH="sdk-provides-dummy-target"

   $PACKAGE_ARCH [3 operations]
     set oe-core/meta/conf/bitbake.conf:150
       [_defaultval] "${TUNE_PKGARCH}"
     set oe-core/meta/conf/documentation.conf:304
       [doc] "The architecture of the resulting package or packages."
     set dummy-sdk-package.inc:12 [__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]
       "${DUMMYARCH}"
   pre-expansion value:
     "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

after revert:
   $SSTATE_MANMACH
     set? oe-core/meta/classes/sstate.bbclass:61
       "${SSTATE_PKGARCH}"
SSTATE_MANMACH="allarch"

   $SSTATE_PKGARCH [2 operations]
     set oe-core/meta/classes/sstate.bbclass:11
       "${PACKAGE_ARCH}"
     set sstate.bbclass:98 [__anon_111__oe_core_meta_classes_sstate_bbclass]
       "allarch"
   pre-expansion value:
     "allarch"
SSTATE_PKGARCH="allarch"

   $PACKAGE_ARCH [4 operations]
     set oe-core/meta/conf/bitbake.conf:150
       [_defaultval] "${TUNE_PKGARCH}"
     set oe-core/meta/conf/documentation.conf:304
       [doc] "The architecture of the resulting package or packages."
     set oe-core/meta/classes/allarch.bbclass:5
       "all"
     set dummy-sdk-package.inc:12 [__anon_12_oe_core_meta_recipes_core_meta_dummy_sdk_package_inc]
       "${DUMMYARCH}"
   pre-expansion value:
     "${DUMMYARCH}"
PACKAGE_ARCH="sdk-provides-dummy-target"

the relevant part of the anonymous python in sstate.bbclass:

    elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH") == "all":
        d.setVar('SSTATE_PKGARCH', "allarch")
    else:
        d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))

So with allarch.bbclass change, the PACKAGE_ARCH isn't set to "all" because multilib is enabled,
but that causes sstate.bbclass to set SSTATE_MANMACH to MACHINE instead of SSTATE_PKGARCH
allarch, where it got MACHINE is still a bit of mystery to me.

Signed-off-by: default avatarMartin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent ae947ffd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment