All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] allarch: disable allarch when multilib is used
@ 2018-08-10  8:14 kai.kang
  2018-08-10  8:14 ` [PATCH 1/1] " kai.kang
  0 siblings, 1 reply; 6+ messages in thread
From: kai.kang @ 2018-08-10  8:14 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

From: Kai Kang <kai.kang@windriver.com>


The following changes since commit da24071e92071ecbefe51314d82bf40f85172485:

  bitbake: toaster/orm/management/commands/lsupdates.py: Use new layerindexlib module (2018-08-02 10:18:27 +0100)

are available in the Git repository at:

  git://git.pokylinux.org/poky-contrib kangkai/disable-allarch
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/disable-allarch

Kai Kang (1):
  allarch: disable allarch when multilib is used

 meta/classes/allarch.bbclass         | 4 ++++
 meta/classes/icecc.bbclass           | 2 +-
 meta/classes/multilib.bbclass        | 3 ++-
 meta/classes/multilib_global.bbclass | 4 +---
 meta/classes/package.bbclass         | 9 ++++++---
 meta/classes/staging.bbclass         | 2 +-
 6 files changed, 15 insertions(+), 9 deletions(-)

-- 
2.18.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] allarch: disable allarch when multilib is used
  2018-08-10  8:14 [PATCH 0/1] allarch: disable allarch when multilib is used kai.kang
@ 2018-08-10  8:14 ` kai.kang
  2018-08-10  9:24   ` richard.purdie
  2018-08-11 16:10   ` richard.purdie
  0 siblings, 2 replies; 6+ messages in thread
From: kai.kang @ 2018-08-10  8:14 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Some allarch packages rdepends non-allarch packages. When multilib is
used, it doesn't expand the dependency chain correctly, e.g.

core-image-sato -> ca-certificates(allarch) -> openssl

we expect dependency chain for lib32-core-image-sato:

lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl

it should install lib32-openssl for ca-certificates but openssl is
still wrongly imported.

Disable allarch when multilib is used.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/classes/allarch.bbclass         | 4 ++++
 meta/classes/icecc.bbclass           | 2 +-
 meta/classes/multilib.bbclass        | 3 ++-
 meta/classes/multilib_global.bbclass | 4 +---
 meta/classes/package.bbclass         | 9 ++++++---
 meta/classes/staging.bbclass         | 2 +-
 6 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index 1eebe0bf2e..0622622d80 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -5,6 +5,10 @@
 PACKAGE_ARCH = "all"
 
 python () {
+    # only enable allarch when multilib is not used
+    if not d.getVar("MULTILIB_VARIANTS"):
+        d.setVar("PACKAGE_ARCH", "all")
+
     # Allow this class to be included but overridden - only set
     # the values if we're still "all" package arch.
     if d.getVar("PACKAGE_ARCH") == "all":
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 0ca8de86c2..b5a8457747 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -171,7 +171,7 @@ def use_icecc(bb,d):
     return "yes"
 
 def icecc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d)
+    return d.getVar("PACKAGE_ARCH") == "all"
 
 def icecc_is_kernel(bb, d):
     return \
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index f2ac8bdfef..7b4d6472b0 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -50,7 +50,8 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
         raise bb.parse.SkipRecipe("We can't extend nativesdk recipes")
 
-    if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
+    if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \
+        and not bb.data.inherits_class('packagegroup', e.data):
         raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups")
 
     # Expand this since this won't work correctly once we set a multilib into place
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index d2ec1adfea..1bb62427b0 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () {
         return
 
     if bb.data.inherits_class('kernel', e.data) or \
-            bb.data.inherits_class('module-base', e.data) or \
-            (bb.data.inherits_class('allarch', e.data) and\
-             not bb.data.inherits_class('packagegroup', e.data)):
+            bb.data.inherits_class('module-base', e.data):
             variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split()
 
             import oe.classextend
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 8459d39b27..f642a307c3 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -499,7 +499,8 @@ def get_package_mapping (pkg, basepkg, d):
 
     if key in data:
         # Have to avoid undoing the write_extra_pkgs(global_variants...)
-        if bb.data.inherits_class('allarch', d) and data[key] == basepkg:
+        if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+            and data[key] == basepkg:
             return pkg
         return data[key]
 
@@ -1410,7 +1411,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_pkgs(variants, pn, packages, pkgdatadir)
 
-    if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
+    if bb.data.inherits_class('allarch', d) and not variants \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
 
     workdir = d.getVar('WORKDIR')
@@ -1499,7 +1501,8 @@ fi
     if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
         write_extra_runtime_pkgs(variants, packages, pkgdatadir)
 
-    if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
+    if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \
+        and not bb.data.inherits_class('packagegroup', d):
         write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
 
 }
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 27b012ecbd..312cfd8007 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -481,7 +481,7 @@ python extend_recipe_sysroot() {
             d2.setVar("WORKDIR", d.getVar("WORKDIR"))
         destsysroot = d2.getVar("RECIPE_SYSROOT")
         # We put allarch recipes into the default sysroot
-        if manifest and "allarch" in manifest:
+        if manifest and "allarch" in manifest and not d.getVar("MULTILIB_VARIANTS"):
             destsysroot = d.getVar("RECIPE_SYSROOT")
 
         native = False
-- 
2.18.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] allarch: disable allarch when multilib is used
  2018-08-10  8:14 ` [PATCH 1/1] " kai.kang
@ 2018-08-10  9:24   ` richard.purdie
  2018-08-10 14:20     ` Kang Kai
  2018-08-11 16:10   ` richard.purdie
  1 sibling, 1 reply; 6+ messages in thread
From: richard.purdie @ 2018-08-10  9:24 UTC (permalink / raw)
  To: kai.kang; +Cc: openembedded-core

On Fri, 2018-08-10 at 16:14 +0800, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
> 
> Some allarch packages rdepends non-allarch packages. When multilib is
> used, it doesn't expand the dependency chain correctly, e.g.
> 
> core-image-sato -> ca-certificates(allarch) -> openssl
> 
> we expect dependency chain for lib32-core-image-sato:
> 
> lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl
> 
> it should install lib32-openssl for ca-certificates but openssl is
> still wrongly imported.
> 
> Disable allarch when multilib is used.
> 
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta/classes/allarch.bbclass         | 4 ++++
>  meta/classes/icecc.bbclass           | 2 +-
>  meta/classes/multilib.bbclass        | 3 ++-
>  meta/classes/multilib_global.bbclass | 4 +---
>  meta/classes/package.bbclass         | 9 ++++++---
>  meta/classes/staging.bbclass         | 2 +-
>  6 files changed, 15 insertions(+), 9 deletions(-)

Looks good at a quick glance, I'll put it in for testing. 

Since I just saw it for other reasons, could you also see if we could
remove the ${DEPLOY_DIR_RPM}/noarch/ mentioned as:

# For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical)
SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/"

from sstate.bbclass please?

Cheers,

Richard


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] allarch: disable allarch when multilib is used
  2018-08-10  9:24   ` richard.purdie
@ 2018-08-10 14:20     ` Kang Kai
  0 siblings, 0 replies; 6+ messages in thread
From: Kang Kai @ 2018-08-10 14:20 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

On 2018年08月10日 17:24, richard.purdie@linuxfoundation.org wrote:
> On Fri, 2018-08-10 at 16:14 +0800, kai.kang@windriver.com wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> Some allarch packages rdepends non-allarch packages. When multilib is
>> used, it doesn't expand the dependency chain correctly, e.g.
>>
>> core-image-sato -> ca-certificates(allarch) -> openssl
>>
>> we expect dependency chain for lib32-core-image-sato:
>>
>> lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl
>>
>> it should install lib32-openssl for ca-certificates but openssl is
>> still wrongly imported.
>>
>> Disable allarch when multilib is used.
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>>   meta/classes/allarch.bbclass         | 4 ++++
>>   meta/classes/icecc.bbclass           | 2 +-
>>   meta/classes/multilib.bbclass        | 3 ++-
>>   meta/classes/multilib_global.bbclass | 4 +---
>>   meta/classes/package.bbclass         | 9 ++++++---
>>   meta/classes/staging.bbclass         | 2 +-
>>   6 files changed, 15 insertions(+), 9 deletions(-)
> Looks good at a quick glance, I'll put it in for testing.
>
> Since I just saw it for other reasons, could you also see if we could
> remove the ${DEPLOY_DIR_RPM}/noarch/ mentioned as:
>
> # For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical)
> SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/"
>
> from sstate.bbclass please?

OK. I'll check it.

Regards,
Kai


>
> Cheers,
>
> Richard
>

-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] allarch: disable allarch when multilib is used
  2018-08-10  8:14 ` [PATCH 1/1] " kai.kang
  2018-08-10  9:24   ` richard.purdie
@ 2018-08-11 16:10   ` richard.purdie
  2018-08-14  9:40     ` Kang Kai
  1 sibling, 1 reply; 6+ messages in thread
From: richard.purdie @ 2018-08-11 16:10 UTC (permalink / raw)
  To: kai.kang; +Cc: openembedded-core

On Fri, 2018-08-10 at 16:14 +0800, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
> 
> Some allarch packages rdepends non-allarch packages. When multilib is
> used, it doesn't expand the dependency chain correctly, e.g.
> 
> core-image-sato -> ca-certificates(allarch) -> openssl
> 
> we expect dependency chain for lib32-core-image-sato:
> 
> lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl
> 
> it should install lib32-openssl for ca-certificates but openssl is
> still wrongly imported.
> 
> Disable allarch when multilib is used.
> 
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta/classes/allarch.bbclass         | 4 ++++
>  meta/classes/icecc.bbclass           | 2 +-
>  meta/classes/multilib.bbclass        | 3 ++-
>  meta/classes/multilib_global.bbclass | 4 +---
>  meta/classes/package.bbclass         | 9 ++++++---
>  meta/classes/staging.bbclass         | 2 +-
>  6 files changed, 15 insertions(+), 9 deletions(-)

With this applied, "bitbake nativesdk-dbus" fails to build since
it can't find the extra autoconf macros from an allarch recipe in
DEPENDS.

e.g. https://autobuilder.yocto.io/builders/nightly-arm/builds/1262/step
s/Building%20Toolchain%20Images/logs/stdio


Cheers,

Richard


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] allarch: disable allarch when multilib is used
  2018-08-11 16:10   ` richard.purdie
@ 2018-08-14  9:40     ` Kang Kai
  0 siblings, 0 replies; 6+ messages in thread
From: Kang Kai @ 2018-08-14  9:40 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

On 2018年08月12日 00:10, richard.purdie@linuxfoundation.org wrote:
> On Fri, 2018-08-10 at 16:14 +0800, kai.kang@windriver.com wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> Some allarch packages rdepends non-allarch packages. When multilib is
>> used, it doesn't expand the dependency chain correctly, e.g.
>>
>> core-image-sato -> ca-certificates(allarch) -> openssl
>>
>> we expect dependency chain for lib32-core-image-sato:
>>
>> lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl
>>
>> it should install lib32-openssl for ca-certificates but openssl is
>> still wrongly imported.
>>
>> Disable allarch when multilib is used.
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>>   meta/classes/allarch.bbclass         | 4 ++++
>>   meta/classes/icecc.bbclass           | 2 +-
>>   meta/classes/multilib.bbclass        | 3 ++-
>>   meta/classes/multilib_global.bbclass | 4 +---
>>   meta/classes/package.bbclass         | 9 ++++++---
>>   meta/classes/staging.bbclass         | 2 +-
>>   6 files changed, 15 insertions(+), 9 deletions(-)
> With this applied, "bitbake nativesdk-dbus" fails to build since
> it can't find the extra autoconf macros from an allarch recipe in
> DEPENDS.
>
> e.g. https://autobuilder.yocto.io/builders/nightly-arm/builds/1262/step
> s/Building%20Toolchain%20Images/logs/stdio

The autoconf-archive-native is not installed to recipe sysroot native. 
Some debug info shows the task do_populate_sysroot
of autoconf-archive-native is not executed. And so do some other 
packages(tasks).

DEBUG: Stampfile 
/buildarea/kkang/yocto/noarch-verify-build-Aug13/tmp/stamps/x86_64-linux/autoconf-archive-native/2018.03.13-r0.do_populate_sysroot_setscene.41bdb37fee4fb443715e1c84a5de281f 
not available
DEBUG: Normal stamp current for task 
virtual:native:/buildarea/kkang/yocto/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2018.03.13.bb:do_populate_sysroot
DEBUG: Found task 
virtual:native:/buildarea/kkang/yocto/poky/meta/recipes-devtools/autoconf-archive/autoconf-archive_2018.03.13.bb:do_populate_sysroot 
which could be accelerated

I have been working on it but not get the root cause yet.

Sorry for the inconvenience.

Regards,
Kai

>
>
> Cheers,
>
> Richard
>

-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-14  9:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-10  8:14 [PATCH 0/1] allarch: disable allarch when multilib is used kai.kang
2018-08-10  8:14 ` [PATCH 1/1] " kai.kang
2018-08-10  9:24   ` richard.purdie
2018-08-10 14:20     ` Kang Kai
2018-08-11 16:10   ` richard.purdie
2018-08-14  9:40     ` Kang Kai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.