From: Robert Yang <liezhi.yang@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/3] run-postinsts: can't be allarch
Date: Tue, 19 Jan 2016 17:22:50 +0800 [thread overview]
Message-ID: <569E006A.6010009@windriver.com> (raw)
In-Reply-To: <1452164226.7598.108.camel@linuxfoundation.org>
On 01/07/2016 06:57 PM, Richard Purdie wrote:
> On Wed, 2016-01-06 at 23:45 -0800, Robert Yang wrote:
>> The dependencies chain:
>> run-postinsts -> update-rc.d.bbclass -> initscripts -> update
>> -alternatives.
>>
>> The update-alternatives is provided by opkg-utils which is not
>> allarch.
>>
>> This caused a problem:
>> $ bitbake lib32-core-image-minimal
>>
>> Both lib32-opkg-utils and opkg-utils would be built, but opkg-utils
>> shouldn't, this patch can fix the problem.
>>
>> [YOCTO #8879]
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>> .../run-postinsts/run-postinsts_1.0.bb | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Removing allarch isn't the correct way to fix this, we need to figure
> out what is going wrong and fix multilib.
After more investigations, it seems that there is no easy way to fix
the problem, maybe we need choose not fix it atm. Here is a short summary.
* Problem
When mutilib is enabled, for example:
MACHINE ?= "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
$ bitbake core-image-minimal
We will see that a few 64 bit pkgs will be built, for example, 64 bit
python, bash, openssl, opkg-utils and, but they shouldn't, since it
doesn't make any sense to build them since they are not going to be
installed on the target by default.
* Root Cause
This is caused by run-postinsts is allarch since:
$ bitbake lib32-run-postinsts
run-postinsts (no lib32 since it is an allarch pkg) would be built,
it depends on non-allarch recipe opkg-utils, and opkg-utils depends
on others, a simple graph.
core-image-minimal -> run-postinsts -> opkg-utils
lib32-core-image-minimal -> (lib32-)run-postinsts -> opkg-utils (should be
lib32)
We can see that lib32-run-postinsts breaks multilib's dependencies chain,
and there is no easy way fix the problem AFAIK.
* What I have tried
- Extend allarch to lib32-allarch, this would changed a lot on allarch,
and if we extend it, allarch is not really "all arch".
- Let each recipe provides a lib32allarch-recipe when extend multilib,
which is used for allarch recipe depends on it, and let bitbake decide
which to run for example:
opkg-utils *provides* lib32allarch-opkg-utils
lib32-opkg-utils *provides* lib32allarch-opkg-utils
And then:
run-postinsts *depends* lib32allarch-opkg-utils
Both opkg-utils and lib32-opkg-utils provides lib32allarch-opkg-utils,
then let bitbake choose a proper to build according what you are building,
(lib32-recipe -> lib32-opkg-utils, recipe -> opkg-utils) this also
need modify bitbake's PREFERRENCE_PROVIDER policies, which seems not worth,
so I drop this idea.
Any suggestions is appreciated.
// Robert
>
> Cheers,
>
> Richard
>
next prev parent reply other threads:[~2016-01-19 9:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 7:45 [PATCH 0/3] meta: 3 fixes Robert Yang
2016-01-07 7:45 ` [PATCH 1/3] cogl-1.0: fix may be used uninitialized error Robert Yang
2016-01-07 7:45 ` [PATCH 2/3] run-postinsts: can't be allarch Robert Yang
2016-01-07 10:57 ` Richard Purdie
2016-01-08 6:03 ` Robert Yang
2016-01-11 8:27 ` Robert Yang
2016-01-19 9:22 ` Robert Yang [this message]
2016-01-07 7:45 ` [PATCH 3/3] liberation-fonts: " Robert Yang
2016-01-07 11:11 ` Martin Jansa
2016-01-07 12:16 ` Phil Blundell
2016-01-07 12:55 ` Martin Jansa
2016-01-13 5:56 ` Robert Yang
2016-01-13 6:00 ` Robert Yang
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=569E006A.6010009@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.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