Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/6][PULL v2] multilib: bug fixes related with RPM backend
@ 2011-09-28 11:44 Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 1/6] multilib.bbclass: map RDEPENDS and LINGUAS_INSTALL for image recipes Dongxiao Xu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-09-28 11:44 UTC (permalink / raw)
  To: openembedded-core

Hi Richard,

This pull request is to fix several multilib bugs related with RPM backend,
please help to review and pull.

Changes from v1:
 - Add a patch to handle PACKAGES dynamic setting in libc-package.bbclass in
multilib case. Otherwise IPK packaging logic will not find the correct
locale-base-* packages.

I've done a round of multilib testing agasint for following combinations for
both RPM and IPK packaging:

 - lib32 sato image on qemux86 machine
 - lib32 sato image on qemux86-64 machine
 - lib64 sato image on qemux86-64 machine
 - lib64 sato image on qemux86 machine (build pass but cannot boot)
 - sato image on qemux86-64 with several lib32 packages (lib32-connman)

All the above test cases can pass the build and most can successfully boot up
(except the lib64 on qemux86 since 64bit code could not run on 32bit machine).

Therefore the following bugs could be addressed:

[YOCTO #1496]
[YOCTO #1497]
[YOCTO #1498]
[YOCTO #1527]

Thanks,
Dongxiao

The following changes since commit 684a4b517d13884c315688967fadd5e6a4845b71:

  libffi: really populate -dev package (2011-09-26 20:50:27 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib dxu4/ml
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/ml

Dongxiao Xu (6):
  multilib.bbclass: map RDEPENDS and LINGUAS_INSTALL for image recipes
  multilib: remove the multilib handling to allarch
  multilib: add MLPREFIX to deploy folder
  tune-i586: fix hardcoded TUNE_PKGARCH
  package_rpm: combine normal and multilib solution manifest together
  libc-package.bbclass: add MLPREFIX when set values to PACKAGES

 meta/classes/libc-package.bbclass                  |    2 +-
 meta/classes/multilib.bbclass                      |   12 +++++-------
 meta/classes/multilib_global.bbclass               |    2 +-
 meta/classes/package_rpm.bbclass                   |   15 +++++++++++----
 meta/classes/rootfs_rpm.bbclass                    |    2 +-
 meta/conf/machine/include/tune-i586.inc            |    3 ++-
 meta/conf/multilib.conf                            |    7 +++++++
 .../python/python-pygobject_2.27.91.bb             |    2 +-
 8 files changed, 29 insertions(+), 16 deletions(-)




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

* [PATCH 1/6] multilib.bbclass: map RDEPENDS and LINGUAS_INSTALL for image recipes
  2011-09-28 11:44 [PATCH 0/6][PULL v2] multilib: bug fixes related with RPM backend Dongxiao Xu
@ 2011-09-28 11:44 ` Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 2/6] multilib: remove the multilib handling to allarch Dongxiao Xu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-09-28 11:44 UTC (permalink / raw)
  To: openembedded-core

RDEPENDS of image type recipe needs to be mapped to make sure that the
packages included in the image should be multilib version.

Also add LINGUAS_INSTALL into MULTILIB_PACKAGE_INSTALL list.

[YOCTO #1496]
[YOCTO #1527]

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/multilib.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 98f6911..0ea1038 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -54,9 +54,12 @@ python __anonymous () {
 
     if bb.data.inherits_class('image', d):
         map_dependencies("PACKAGE_INSTALL", d)
-        pinstall = d.getVar("PACKAGE_INSTALL", True) + " " + d.getVar("MULTILIB_PACKAGE_INSTALL", False)
+        map_dependencies("LINGUAS_INSTALL", d)
+        map_dependencies("RDEPENDS", d)
+        pinstall = d.getVar("LINGUAS_INSTALL", True) + " " + d.getVar("PACKAGE_INSTALL", True) + " " + d.getVar("MULTILIB_PACKAGE_INSTALL", False)
         d.setVar("MULTILIB_PACKAGE_INSTALL", pinstall)
         d.setVar("PACKAGE_INSTALL", "")
+        d.setVar("LINGUAS_INSTALL", "")
         # FIXME, we need to map this to something, not delete it!
         d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", "")
         return
-- 
1.7.1




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

* [PATCH 2/6] multilib: remove the multilib handling to allarch
  2011-09-28 11:44 [PATCH 0/6][PULL v2] multilib: bug fixes related with RPM backend Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 1/6] multilib.bbclass: map RDEPENDS and LINGUAS_INSTALL for image recipes Dongxiao Xu
@ 2011-09-28 11:44 ` Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 3/6] multilib: add MLPREFIX to deploy folder Dongxiao Xu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-09-28 11:44 UTC (permalink / raw)
  To: openembedded-core

currently we have allarch type of recipes, which may still have
architecture dependency, like x11-common. So we need to drop the
handling to allarch in multilib case.

Also remove the PV postfix in python-pygobject DEPENDS, since multilib
code will treat a native package multilib capable.

[YOCTO #1497]
[YOCTO #1498]

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/multilib.bbclass                      |    2 +-
 meta/classes/multilib_global.bbclass               |    2 +-
 meta/conf/multilib.conf                            |    7 +++++++
 .../python/python-pygobject_2.27.91.bb             |    2 +-
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 0ea1038..6c0dd37 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -8,7 +8,7 @@ python multilib_virtclass_handler () {
         return
 
     # There should only be one kernel in multilib configs
-    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):
+    if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data):
         raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
 
     if bb.data.inherits_class('image', e.data):
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index cd22163..2da66a5 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -5,7 +5,7 @@ python multilib_virtclass_handler_global () {
     variant = e.data.getVar("BBEXTENDVARIANT", True)
 
     if isinstance(e, bb.event.RecipeParsed) and not variant:
-        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):
+        if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data):
             variants = (e.data.getVar("MULTILIB_VARIANTS", True) or "").split()
 
             # Process PROVIDES
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 3133bf1..b9da33a 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -452,3 +452,10 @@ BBCLASSEXTEND_append_pn-zip = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-zlib = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-zypper = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-libsdl = " ${MULTILIBS}"
+BBCLASSEXTEND_append_pn-qemu-config = " ${MULTILIBS}"
+BBCLASSEXTEND_append_pn-x11-common = " ${MULTILIBS}"
+BBCLASSEXTEND_append_pn-update-rc.d = " ${MULTILIBS}"
+BBCLASSEXTEND_append_pn-avahi-ui = " ${MULTILIBS}"
+BBCLASSEXTEND_append_pn-python-pycairo = " ${MULTILIBS}"
+BBCLASSEXTEND_append_pn-python-pygtk = " ${MULTILIBS}"
+BBCLASSEXTEND_append_pn-python-pygobject = " ${MULTILIBS}"
diff --git a/meta/recipes-devtools/python/python-pygobject_2.27.91.bb b/meta/recipes-devtools/python/python-pygobject_2.27.91.bb
index 9ff2fe7..fd696a5 100644
--- a/meta/recipes-devtools/python/python-pygobject_2.27.91.bb
+++ b/meta/recipes-devtools/python/python-pygobject_2.27.91.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Python GObject bindings"
 SECTION = "devel/python"
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-DEPENDS = "python python-pygobject-native-${PV} glib-2.0"
+DEPENDS = "python python-pygobject-native glib-2.0"
 DEPENDS_virtclass-native = "glib-2.0-native"
 RDEPENDS_virtclass-native = ""
 PR = "r2"
-- 
1.7.1




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

* [PATCH 3/6] multilib: add MLPREFIX to deploy folder
  2011-09-28 11:44 [PATCH 0/6][PULL v2] multilib: bug fixes related with RPM backend Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 1/6] multilib.bbclass: map RDEPENDS and LINGUAS_INSTALL for image recipes Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 2/6] multilib: remove the multilib handling to allarch Dongxiao Xu
@ 2011-09-28 11:44 ` Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 4/6] tune-i586: fix hardcoded TUNE_PKGARCH Dongxiao Xu
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-09-28 11:44 UTC (permalink / raw)
  To: openembedded-core

Add MLPREFIX to multilib deploy forlder to avoid the confliction between
multilib and normal package deploy directory.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/multilib.bbclass    |    5 -----
 meta/classes/package_rpm.bbclass |   10 ++++++++--
 meta/classes/rootfs_rpm.bbclass  |    2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 6c0dd37..1aed2a9 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -92,9 +92,4 @@ python __anonymous () {
     multilib_map_variable("PACKAGES_DYNAMIC", variant, d)
     multilib_map_variable("PACKAGE_INSTALL", variant, d)
     multilib_map_variable("INITSCRIPT_PACKAGES", variant, d)
-
-    package_arch = d.getVar("PACKAGE_ARCH", True)
-    machine_arch = d.getVar("MACHINE_ARCH", True)
-    if package_arch == machine_arch:
-        d.setVar("PACKAGE_ARCH", variant + "_" + package_arch)
 }
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 775d525..45de0f8 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -903,8 +903,14 @@ python do_package_rpm () {
 	rpmbuild = bb.data.getVar('RPMBUILD', d, True)
 	targetsys = bb.data.getVar('TARGET_SYS', d, True)
 	targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
-	pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
-	pkgarch = bb.data.expand('${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d)
+	package_arch = bb.data.getVar('PACKAGE_ARCH', d, True) or ""
+	if package_arch not in "all any noarch".split():
+		ml_prefix = (bb.data.getVar('MLPREFIX', d, True) or "").replace("-", "_")
+		bb.data.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch, d)
+	else:
+		bb.data.setVar('PACKAGE_ARCH_EXTEND', package_arch, d)
+	pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}', d)
+	pkgarch = bb.data.expand('${PACKAGE_ARCH_EXTEND}${TARGET_VENDOR}-${TARGET_OS}', d)
 	magicfile = bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d)
 	bb.mkdirhier(pkgwritedir)
 	os.chmod(pkgwritedir, 0755)
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 5ac6bca..dd370b2 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -220,8 +220,8 @@ python () {
             default_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False)
             if default_tune:
                 localdata.setVar("DEFAULTTUNE", default_tune)
-            localdata.setVar("MACHINE_ARCH", eext[1] + "_" + localdata.getVar("MACHINE_ARCH", False))
             package_archs = localdata.getVar("PACKAGE_ARCHS", True) or ""
+            package_archs = " ".join([i in "all noarch any".split() and i or eext[1]+"_"+i for i in package_archs.split()])
             ml_package_archs += " " + package_archs
             ml_prefix_list += " " + eext[1]
             #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1], localdata.getVar("PACKAGE_ARCHS", True) or "(none)", overrides))
-- 
1.7.1




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

* [PATCH 4/6] tune-i586: fix hardcoded TUNE_PKGARCH
  2011-09-28 11:44 [PATCH 0/6][PULL v2] multilib: bug fixes related with RPM backend Dongxiao Xu
                   ` (2 preceding siblings ...)
  2011-09-28 11:44 ` [PATCH 3/6] multilib: add MLPREFIX to deploy folder Dongxiao Xu
@ 2011-09-28 11:44 ` Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 5/6] package_rpm: combine normal and multilib solution manifest together Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 6/6] libc-package.bbclass: add MLPREFIX when set values to PACKAGES Dongxiao Xu
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-09-28 11:44 UTC (permalink / raw)
  To: openembedded-core

Use TUNE_FEATURES to determine the setting to TUNE_PKGARCH, which fixes
the wrong setting of PACKAGE_ARCH in multilib case.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/conf/machine/include/tune-i586.inc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/conf/machine/include/tune-i586.inc b/meta/conf/machine/include/tune-i586.inc
index ba655b9..a40ce18 100644
--- a/meta/conf/machine/include/tune-i586.inc
+++ b/meta/conf/machine/include/tune-i586.inc
@@ -1,5 +1,6 @@
 DEFAULTTUNE ?= "i586"
-TUNE_PKGARCH ?= "i586"
+TUNE_PKGARCH_TMP = "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86", "x86_64", d)}"
+TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "i586", "i586", TUNE_PKGARCH_TMP, d)}"
 
 require conf/machine/include/ia32/arch-ia32.inc
 
-- 
1.7.1




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

* [PATCH 5/6] package_rpm: combine normal and multilib solution manifest together
  2011-09-28 11:44 [PATCH 0/6][PULL v2] multilib: bug fixes related with RPM backend Dongxiao Xu
                   ` (3 preceding siblings ...)
  2011-09-28 11:44 ` [PATCH 4/6] tune-i586: fix hardcoded TUNE_PKGARCH Dongxiao Xu
@ 2011-09-28 11:44 ` Dongxiao Xu
  2011-09-28 11:44 ` [PATCH 6/6] libc-package.bbclass: add MLPREFIX when set values to PACKAGES Dongxiao Xu
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-09-28 11:44 UTC (permalink / raw)
  To: openembedded-core

When RPM does the real install, if the first manifest file is empty, the
installation will stop without handling the second manifest file.

Merge the two manifest files together to fix this issue.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/package_rpm.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 45de0f8..fa0d8c3 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -395,6 +395,8 @@ package_install_internal_rpm () {
 		-D "__dbi_txn create nofsync private" \
 		| grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/install_multilib_solution.manifest
 
+	cat ${target_rootfs}/install/install_solution.manifest > ${target_rootfs}/install/total_solution.manifest
+	cat ${target_rootfs}/install/install_multilib_solution.manifest >> ${target_rootfs}/install/total_solution.manifest
 
 	# Attempt install
 	${RPM} --root ${target_rootfs} \
@@ -403,8 +405,7 @@ package_install_internal_rpm () {
 		-D "_dbpath ${rpmlibdir}" \
 		--noscripts --notriggers --noparentdirs --nolinktos --replacepkgs \
 		-D "__dbi_txn create nofsync private" \
-		-Uhv ${target_rootfs}/install/install_solution.manifest \
-		${target_rootfs}/install/install_multilib_solution.manifest
+		-Uhv ${target_rootfs}/install/total_solution.manifest
 }
 
 python write_specfile () {
-- 
1.7.1




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

* [PATCH 6/6] libc-package.bbclass: add MLPREFIX when set values to PACKAGES
  2011-09-28 11:44 [PATCH 0/6][PULL v2] multilib: bug fixes related with RPM backend Dongxiao Xu
                   ` (4 preceding siblings ...)
  2011-09-28 11:44 ` [PATCH 5/6] package_rpm: combine normal and multilib solution manifest together Dongxiao Xu
@ 2011-09-28 11:44 ` Dongxiao Xu
  5 siblings, 0 replies; 7+ messages in thread
From: Dongxiao Xu @ 2011-09-28 11:44 UTC (permalink / raw)
  To: openembedded-core

There are some places that PACKAGES are dynamically set. To support
multilib, we need to add MLPREFIX before the package name in those
settings.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/libc-package.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 9d32844..71a577b 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -311,7 +311,7 @@ python package_do_split_gconvs () {
 			raise bb.build.FuncFailed("localedef returned an error")
 
 	def output_locale(name, locale, encoding):
-		pkgname = 'locale-base-' + legitimize_package_name(name)
+		pkgname = bb.data.getVar('MLPREFIX', d) + 'locale-base-' + legitimize_package_name(name)
 		bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d)
 		bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d)
 		rprovides = ' virtual-locale-%s' % legitimize_package_name(name)
-- 
1.7.1




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

end of thread, other threads:[~2011-09-28 11:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-28 11:44 [PATCH 0/6][PULL v2] multilib: bug fixes related with RPM backend Dongxiao Xu
2011-09-28 11:44 ` [PATCH 1/6] multilib.bbclass: map RDEPENDS and LINGUAS_INSTALL for image recipes Dongxiao Xu
2011-09-28 11:44 ` [PATCH 2/6] multilib: remove the multilib handling to allarch Dongxiao Xu
2011-09-28 11:44 ` [PATCH 3/6] multilib: add MLPREFIX to deploy folder Dongxiao Xu
2011-09-28 11:44 ` [PATCH 4/6] tune-i586: fix hardcoded TUNE_PKGARCH Dongxiao Xu
2011-09-28 11:44 ` [PATCH 5/6] package_rpm: combine normal and multilib solution manifest together Dongxiao Xu
2011-09-28 11:44 ` [PATCH 6/6] libc-package.bbclass: add MLPREFIX when set values to PACKAGES Dongxiao Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox