Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH] handle PACKAGE_ARCH change in an amend.inc
Date: Sun, 21 Nov 2010 19:46:37 +0100	[thread overview]
Message-ID: <4CE9690D.2030307@eukrea.com> (raw)
In-Reply-To: <AANLkTimB+pvrtjXGMrHds-MDQC5SOMw-kS=L5fG6UAGb@mail.gmail.com>

On 21/11/2010 18:53, Chris Larson wrote:
> 2010/11/21 Eric Bénard<eric@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



  reply	other threads:[~2010-11-21 18:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17 13:55 [PATCH] amend.bbclass: handle PACKAGE_ARCH change in an amend.inc Eric Bénard
2010-11-18 18:03 ` Denys Dmytriyenko
2010-11-18 18:11   ` Eric Bénard
2010-11-18 18:46     ` Paul Menzel
2010-11-21 15:19     ` [PATCH] " Eric Bénard
2010-11-21 16:28       ` Khem Raj
2010-11-21 17:53       ` Chris Larson
2010-11-21 18:46         ` Eric Bénard [this message]
2010-11-21 19:42         ` Eric Bénard
2010-11-21 23:16           ` Chris Larson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CE9690D.2030307@eukrea.com \
    --to=eric@eukrea.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox