[oe] [PATCH] handle PACKAGE_ARCH change in an amend.inc
Eric Bénard
eric at eukrea.com
Sun Nov 21 18:46:37 UTC 2010
On 21/11/2010 18:53, Chris Larson wrote:
> 2010/11/21 Eric Bénard<eric at eukrea.com>
>
>> + #
>> + # We always try to scan SRC_URI for urls with machine overrides
>> + # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0
>> + #
>> + override = bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1)
>> + if override != '0' and is_machine_specific(d):
>> + bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d)
>> + bb.data.setVar('MULTIMACH_ARCH', mach_arch, d)
>> + return
>> +
>> + multiarch = pkg_arch
>> +
>> + packages = bb.data.getVar('PACKAGES', d, 1).split()
>> + for pkg in packages:
>> + pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1)
>> +
>> + # We could look for != PACKAGE_ARCH here but how to choose
>> + # if multiple differences are present?
>> + # Look through PACKAGE_ARCHS for the priority order?
>> + if pkgarch and pkgarch == mach_arch:
>> + multiarch = mach_arch
>> + break
>> +
>>
>
> This is wrong. You do the loop here, set multiarch = mach_arch, and then
> never do anything with multiarch. If this function is really supposed to be
> setting MULTIMACH_ARCH, then you need to do so here as well.
> bb.data.setVar("MULTIMACH_ARCH", multiarch, d)
you're right, I forget the last line when moving the block to set_multimach_arch .
Eric
More information about the Openembedded-devel
mailing list