rpm: multilib related fixes
cover rpm: multilib related fixes
Hi Richard and Mark,
This pull request is to fix several multilib related issues to rpm, includes:
1) Add architecture information in RPM spec file to fix bug 1457.
2) For recipes with MACHINE_ARCH as PACKAGE_ARCH, the deploy folder is defined as tmp/deploy/lib32(64)-${MACHINE_ARCH} to avoid confliction with normal recipe deploy folder.
3) Add MULTILIB_IMAGE_INSTALL in the package installation list.
Please help to review them.
Thanks,
Dongxiao
Dongxiao Xu (3):
package_rpm: add architecture info in rpm spec file
rpm: add multilib prefix for archs under deploy/rpm
multilib: install MULTILIB_PACKAGE_INSTALL
meta/classes/multilib.bbclass | 6 +++ meta/classes/package_rpm.bbclass | 78 +++++++++++++++++++++++++++++++------- meta/classes/rootfs_rpm.bbclass | 8 +++- 3 files changed, 77 insertions(+), 15 deletions(-)
PATCH 1/3 package_rpm: add architecture info in rpm spec file
For supporting multilib, architecture information is needed in package require/provide/suggest/recommend fields.
Use DEFAULTTUNE value as the postfix.
For "all" arch recipe, it requires "all" arch recipe with no postfix, but provides all possible multilib archs.
For example, qemu-config:
Requires: rsync
Requires: update-rc.d
Requires: task-core-nfs-server
Requires: distcc
Requires: oprofileui-server
Requires: dbus-x11
Requires: bash
Provides: qemu-config.x86
Provides: qemu-config.x86-64
For other recipe like zlib:
Requires: libc6.x86-64 >= 2.13
Provides: zlib.x86-64
[YOCTO #1457]
--- meta/classes/multilib.bbclass | 1 + meta/classes/package_rpm.bbclass | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-)
meta/classes/multilib.bbclass +1 -0
@@ -23,6 +23,7 @@ python multilib_virtclass_handler () { e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant) e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant) + e.data.setVar("SAVED_DEFAULTTUNE", e.data.getVar("DEFAULTTUNE", True)) e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override) }
meta/classes/package_rpm.bbclass +36 -0
@@ -350,6 +350,7 @@ package_install_internal_rpm () { python write_specfile () { import textwrap import oe.packagedata + import re # We need a simple way to remove the MLPREFIX from the package name, # and dependency information...
@@ -498,6 +499,8 @@ python write_specfile () { splitname = strip_multilib(pkgname, d) + defaulttune = bb.data.getVar('DEFAULTTUNE', localdata, True) + splitsummary = (bb.data.getVar('SUMMARY', localdata, True) or bb.data.getVar('DESCRIPTION', localdata, True) or ".") splitversion = (bb.data.getVar('PKGV', localdata, True) or "").replace('-', '+') splitrelease = (bb.data.getVar('PKGR', localdata, True) or "")
@@ -528,6 +531,39 @@ python write_specfile () { if pkg == d.getVar("PN", True): splitrprovides = splitrprovides + " " + (d.getVar('ALTERNATIVE_LINK', True) or '') + " " + (d.getVar('ALTERNATIVE_LINKS', True) or '') + package_arch = bb.data.getVar('PACKAGE_ARCH', localdata, True) + + splitrprovides = splitrprovides + " " + splitname + "." + defaulttune + if package_arch != "all": + pattern = '\([^()]*\)' + prog = re.compile(pattern) + + str_list = [splitrdepends, splitrrecommends, splitrsuggests] + for e in range(len(str_list)): + brackets = prog.findall(str_list[e]) + for i in range(len(brackets)): + str_list[e] = str_list[e].replace(brackets[i], "#BRACKETS"+str(i)+"#") + tmp = "" + for i in str_list[e].split(): + if i.startswith("#BRACKETS"): + tmp += " " + str(i) + continue + tmp += " " + str(i) + "." + defaulttune + str_list[e] = tmp + for i in range(len(brackets)): + str_list[e] = str_list[e].replace("#BRACKETS"+str(i)+"#", brackets[i]) + + [splitrdepends, splitrrecommends, splitrsuggests] = str_list + else: + variants = (bb.data.getVar("MULTILIB_VARIANTS", localdata, True) or "").split() + for variant in variants: + tune = bb.data.getVar("DEFAULTTUNE_virtclass-multilib-" + variant, localdata, True) or "" + if tune: + splitrprovides = splitrprovides + " " + splitname + "." + tune + tune = bb.data.getVar("SAVED_DEFAULTTUNE", localdata, True) or "" + if tune: + splitrprovides = splitrprovides + " " + splitname + "." + tune + # Gather special src/first package data if srcname == splitname: srcrdepends = splitrdepends
Signature · 1 line
1.7.1
Re: [PATCH 1/3] package_rpm: add architecture info in rpm spec file
This patch is incorrect. Architectural information should not be in the dependencies within RPM packages.
RPM is expected to find the proper version of a package to install based on the existing dependency information. I'm in the process of investigating why certain items are not found properly.
--Mark
Quoted 106 lines · Dongxiao Xu
For supporting multilib, architecture information is needed in package require/provide/suggest/recommend fields.
Use DEFAULTTUNE value as the postfix.
For "all" arch recipe, it requires "all" arch recipe with no postfix, but provides all possible multilib archs.
For example, qemu-config:
Requires: rsync
Requires: update-rc.d
Requires: task-core-nfs-server
Requires: distcc
Requires: oprofileui-server
Requires: dbus-x11
Requires: bash
Provides: qemu-config.x86
Provides: qemu-config.x86-64For other recipe like zlib:
Requires: libc6.x86-64 >= 2.13
Provides: zlib.x86-64[YOCTO #1457]
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 1 + meta/classes/package_rpm.bbclass | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-)meta/classes/multilib.bbclass +1
-0@@ -23,6 +23,7 @@ python multilib_virtclass_handler () { e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant) e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant) + e.data.setVar("SAVED_DEFAULTTUNE", e.data.getVar("DEFAULTTUNE", True)) e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override) }meta/classes/package_rpm.bbclass +36
-0@@ -350,6 +350,7 @@ package_install_internal_rpm () { python write_specfile () { import textwrap import oe.packagedata + import re # We need a simple way to remove the MLPREFIX from the package name, # and dependency information...@@ -498,6 +499,8 @@ python write_specfile () { splitname = strip_multilib(pkgname, d) + defaulttune = bb.data.getVar('DEFAULTTUNE', localdata, True) + splitsummary = (bb.data.getVar('SUMMARY', localdata, True) or bb.data.getVar('DESCRIPTION', localdata, True) or ".") splitversion = (bb.data.getVar('PKGV', localdata, True) or "").replace('-', '+') splitrelease = (bb.data.getVar('PKGR', localdata, True) or "")@@ -528,6 +531,39 @@ python write_specfile () { if pkg == d.getVar("PN", True): splitrprovides = splitrprovides + " " + (d.getVar('ALTERNATIVE_LINK', True) or '') + " " + (d.getVar('ALTERNATIVE_LINKS', True) or '') + package_arch = bb.data.getVar('PACKAGE_ARCH', localdata, True) + + splitrprovides = splitrprovides + " " + splitname + "." + defaulttune + if package_arch != "all": + pattern = '\([^()]*\)' + prog = re.compile(pattern) + + str_list = [splitrdepends, splitrrecommends, splitrsuggests] + for e in range(len(str_list)): + brackets = prog.findall(str_list[e]) + for i in range(len(brackets)): + str_list[e] = str_list[e].replace(brackets[i], "#BRACKETS"+str(i)+"#") + tmp = "" + for i in str_list[e].split(): + if i.startswith("#BRACKETS"): + tmp += " " + str(i) + continue + tmp += " " + str(i) + "." + defaulttune + str_list[e] = tmp + for i in range(len(brackets)): + str_list[e] = str_list[e].replace("#BRACKETS"+str(i)+"#", brackets[i]) + + [splitrdepends, splitrrecommends, splitrsuggests] = str_list + else: + variants = (bb.data.getVar("MULTILIB_VARIANTS", localdata, True) or "").split() + for variant in variants: + tune = bb.data.getVar("DEFAULTTUNE_virtclass-multilib-" + variant, localdata, True) or "" + if tune: + splitrprovides = splitrprovides + " " + splitname + "." + tune + tune = bb.data.getVar("SAVED_DEFAULTTUNE", localdata, True) or "" + if tune: + splitrprovides = splitrprovides + " " + splitname + "." + tune + # Gather special src/first package data if srcname == splitname: srcrdepends = splitrdepends
Re: [PATCH 1/3] package_rpm: add architecture info in rpm spec file
Hi Mark,
Quoted 9 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Monday, September 12, 2011 10:52 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 1/3]package_rpm: add architecture info in rpm spec file
Quoted 6 lines
This patch is incorrect. Architectural information should not be in the dependencies within RPM packages.
RPM is expected to find the proper version of a package to install based on the existing dependency information. I'm in the process of investigating why certain items are not found properly.
Take "task-core-boot-1.0-r8.qemux86_64.rpm" as an example, and it has dependency on tinylogin, how can it determine whether it is depends on " tinylogin-1.4-r7.x86_64.rpm" or "tinylogin-1.4-r7.x86.rpm".
Thanks,
Dongxiao
Quoted 132 lines
--Mark
Quoted 25 lines · Dongxiao Xu
For supporting multilib, architecture information is needed in package require/provide/suggest/recommend fields.
Use DEFAULTTUNE value as the postfix.
For "all" arch recipe, it requires "all" arch recipe with no postfix, but provides all possible multilib archs.
For example, qemu-config:
Requires: rsync
Requires: update-rc.d
Requires: task-core-nfs-server
Requires: distcc
Requires: oprofileui-server
Requires: dbus-x11
Requires: bash
Provides: qemu-config.x86
Provides: qemu-config.x86-64For other recipe like zlib:
Requires: libc6.x86-64 >= 2.13
Provides: zlib.x86-64Quoted 6 lines
[YOCTO #1457]
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 1 + meta/classes/package_rpm.bbclass | 36++++++++++++++++++++++++++++++++++++
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 24
Quoted 9 lines
2 files changed, 37 insertions(+), 0 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 583d76b..76c86b2 100644
meta/classes/multilib.bbclass +0
-0@@ -23,6 +23,7 @@ python multilib_virtclass_handler () { e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) e.data.setVar("SHLIBSDIR_virtclass-multilib-" +variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 27
Quoted 3 lines
meta/classes/multilib.bbclass +1
-0e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant) + e.data.setVar("SAVED_DEFAULTTUNE",e.data.getVar("DEFAULTTUNE",
Quoted 18 lines
meta/classes/multilib.bbclass +1
-0+ True)) e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) +override) }
meta/classes/package_rpm.bbclass +1
-0@@ -350,6 +350,7 @@ package_install_internal_rpm () { python write_specfile () { import textwrap import oe.packagedata + import re # We need a simple way to remove the MLPREFIX from the package name, # and dependency information...meta/classes/package_rpm.bbclass python write_specfile () { · line 504
Quoted 6 lines
meta/classes/package_rpm.bbclass +2
-0@@ -498,6 +499,8 @@ python write_specfile () { splitname = strip_multilib(pkgname, d) + defaulttune = bb.data.getVar('DEFAULTTUNE', localdata, True) + splitsummary = (bb.data.getVar('SUMMARY', localdata, True) or
bb.data.getVar('DESCRIPTION', localdata, True)or ".")meta/classes/package_rpm.bbclass python write_specfile () { · line 505
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0splitversion = (bb.data.getVar('PKGV', localdata, True) or"").replace('-', '+')
Quoted 9 lines
meta/classes/package_rpm.bbclass +0
-1splitrelease = (bb.data.getVar('PKGR', localdata, True) or "") @@ -528,6 +531,39 @@ python write_specfile () { if pkg == d.getVar("PN", True): splitrprovides = splitrprovides + " " +(
d.getVar('ALTERNATIVE_LINK', True)or '') + " " + (d.getVar('ALTERNATIVE_LINKS', True)or '')meta/classes/package_rpm.bbclass +2
-0+ package_arch = bb.data.getVar('PACKAGE_ARCH', localdata, True) +meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 10 lines
meta/classes/package_rpm.bbclass +10
-0+ splitrprovides = splitrprovides + " " + splitname + "." + defaulttune + if package_arch != "all": + pattern = '\([^()]*\)' + prog = re.compile(pattern) + + str_list = [splitrdepends, splitrrecommends, splitrsuggests] + for e in range(len(str_list)): + brackets = prog.findall(str_list[e]) + for i in range(len(brackets)): + str_list[e] = str_list[e].replace(brackets[i],"#BRACKETS"+str(i)+"#")
Quoted 4 lines
meta/classes/package_rpm.bbclass +4
-0+ tmp = "" + for i in str_list[e].split(): + if i.startswith("#BRACKETS"): + tmp += " " + str(i)meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 10 lines
meta/classes/package_rpm.bbclass +10
-0+ continue + tmp += " " + str(i) + "." + defaulttune + str_list[e] = tmp + for i in range(len(brackets)): + str_list[e] = str_list[e].replace("#BRACKETS"+str(i)+"#", +brackets[i]) + + [splitrdepends, splitrrecommends, splitrsuggests] = str_list + else: + variants = (bb.data.getVar("MULTILIB_VARIANTS", localdata,True) or "").split()
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ for variant in variants: + tune = bb.data.getVar("DEFAULTTUNE_virtclass-multilib-" +variant, localdata, True) or ""
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname + "." +tune
meta/classes/package_rpm.bbclass
Quoted 1 line
meta/classes/package_rpm.bbclass +1
-0+ tune = bb.data.getVar("SAVED_DEFAULTTUNE", localdata, True)or ""
meta/classes/package_rpm.bbclass python write_specfile () { · line 569
Quoted 6 lines
meta/classes/package_rpm.bbclass +3
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname + "." + tune + # Gather special src/first package data if srcname == splitname: srcrdepends = splitrdepends_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/3] package_rpm: add architecture info in rpm spec file
Quoted 11 lines · Dongxiao
Hi Mark,
Quoted 9 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Monday, September 12, 2011 10:52 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 1/3]package_rpm: add architecture info in rpm spec file
Quoted 8 lines
Quoted 6 lines
This patch is incorrect. Architectural information should not be in the dependencies within RPM packages.
RPM is expected to find the proper version of a package to install based on the existing dependency information. I'm in the process of investigating why certain items are not found properly.
Take "task-core-boot-1.0-r8.qemux86_64.rpm" as an example, and it has dependency on tinylogin, how can it determine whether it is depends on " tinylogin-1.4-r7.x86_64.rpm" or "tinylogin-1.4-r7.x86.rpm".
In this case, it should not matter which one it uses. If the dependency is on "tinylogin", then either of them fulfills the dependency. RPM should be selecting which one to bring in using it's internal policy manager. (I believe the default is that 64-bit wins...)
For libraries where it does matter, the dependency system should already be finding the correct architecture for the library.
This does raise an issue in my mind though. Is an architecture for "tasks" justifiable? Why isn't the task-core-boot an all or noarch package?
Is there any difference between a task-core-boot and "lib32-task-core-boot"?
Should we expect a difference between the two?
--Mark
Quoted 135 lines
Thanks,
DongxiaoQuoted 132 lines
--Mark
Quoted 25 lines · Dongxiao Xu
For supporting multilib, architecture information is needed in package require/provide/suggest/recommend fields.
Use DEFAULTTUNE value as the postfix.
For "all" arch recipe, it requires "all" arch recipe with no postfix, but provides all possible multilib archs.
For example, qemu-config:
Requires: rsync
Requires: update-rc.d
Requires: task-core-nfs-server
Requires: distcc
Requires: oprofileui-server
Requires: dbus-x11
Requires: bash
Provides: qemu-config.x86
Provides: qemu-config.x86-64For other recipe like zlib:
Requires: libc6.x86-64 >= 2.13
Provides: zlib.x86-64Quoted 6 lines
[YOCTO #1457]
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 1 + meta/classes/package_rpm.bbclass | 36++++++++++++++++++++++++++++++++++++
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 24
Quoted 9 lines
2 files changed, 37 insertions(+), 0 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 583d76b..76c86b2 100644
meta/classes/multilib.bbclass +0
-0@@ -23,6 +23,7 @@ python multilib_virtclass_handler () { e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) e.data.setVar("SHLIBSDIR_virtclass-multilib-" +variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 27
Quoted 3 lines
meta/classes/multilib.bbclass +1
-0e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant) + e.data.setVar("SAVED_DEFAULTTUNE",e.data.getVar("DEFAULTTUNE",
Quoted 18 lines
meta/classes/multilib.bbclass +1
-0+ True)) e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) +override) }
meta/classes/package_rpm.bbclass +1
-0@@ -350,6 +350,7 @@ package_install_internal_rpm () { python write_specfile () { import textwrap import oe.packagedata + import re # We need a simple way to remove the MLPREFIX from the package name, # and dependency information...meta/classes/package_rpm.bbclass python write_specfile () { · line 504
Quoted 6 lines
meta/classes/package_rpm.bbclass +2
-0@@ -498,6 +499,8 @@ python write_specfile () { splitname = strip_multilib(pkgname, d) + defaulttune = bb.data.getVar('DEFAULTTUNE', localdata, True) + splitsummary = (bb.data.getVar('SUMMARY', localdata, True) or
bb.data.getVar('DESCRIPTION', localdata, True)or ".")meta/classes/package_rpm.bbclass python write_specfile () { · line 505
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0splitversion = (bb.data.getVar('PKGV', localdata, True) or"").replace('-', '+')
Quoted 9 lines
meta/classes/package_rpm.bbclass +0
-1splitrelease = (bb.data.getVar('PKGR', localdata, True) or "") @@ -528,6 +531,39 @@ python write_specfile () { if pkg == d.getVar("PN", True): splitrprovides = splitrprovides + " " +(
d.getVar('ALTERNATIVE_LINK', True)or '') + " " + (d.getVar('ALTERNATIVE_LINKS', True)or '')meta/classes/package_rpm.bbclass +2
-0+ package_arch = bb.data.getVar('PACKAGE_ARCH', localdata, True) +meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 10 lines
meta/classes/package_rpm.bbclass +10
-0+ splitrprovides = splitrprovides + " " + splitname + "." + defaulttune + if package_arch != "all": + pattern = '\([^()]*\)' + prog = re.compile(pattern) + + str_list = [splitrdepends, splitrrecommends, splitrsuggests] + for e in range(len(str_list)): + brackets = prog.findall(str_list[e]) + for i in range(len(brackets)): + str_list[e] = str_list[e].replace(brackets[i],"#BRACKETS"+str(i)+"#")
Quoted 4 lines
meta/classes/package_rpm.bbclass +4
-0+ tmp = "" + for i in str_list[e].split(): + if i.startswith("#BRACKETS"): + tmp += " " + str(i)meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 10 lines
meta/classes/package_rpm.bbclass +10
-0+ continue + tmp += " " + str(i) + "." + defaulttune + str_list[e] = tmp + for i in range(len(brackets)): + str_list[e] = str_list[e].replace("#BRACKETS"+str(i)+"#", +brackets[i]) + + [splitrdepends, splitrrecommends, splitrsuggests] = str_list + else: + variants = (bb.data.getVar("MULTILIB_VARIANTS", localdata,True) or "").split()
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ for variant in variants: + tune = bb.data.getVar("DEFAULTTUNE_virtclass-multilib-" +variant, localdata, True) or ""
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname + "." +tune
meta/classes/package_rpm.bbclass
Quoted 1 line
meta/classes/package_rpm.bbclass +1
-0+ tune = bb.data.getVar("SAVED_DEFAULTTUNE", localdata, True)or ""
meta/classes/package_rpm.bbclass python write_specfile () { · line 569
Quoted 6 lines
meta/classes/package_rpm.bbclass +3
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname + "." + tune + # Gather special src/first package data if srcname == splitname: srcrdepends = splitrdepends_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/3] package_rpm: add architecture info in rpm spec file
Hi Mark,
Quoted 27 lines
-----Original Message-----
From: Mark Hatle [mailto:[email protected]]
Sent: Tuesday, September 13, 2011 11:29 PM
To: Xu, Dongxiao
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 1/3]package_rpm: add architecture info in rpm spec fileQuoted 18 lines · Dongxiao
Hi Mark,
Quoted 15 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Monday, September 12, 2011 10:52 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 1/3]package_rpm: add architecture info in rpm spec fileThis patch is incorrect. Architectural information should not be in the dependencies within RPM packages.
RPM is expected to find the proper version of a package to install based on the existing dependency information. I'm in the process of investigating why certain items are not found properly.
Quoted 8 lines
Quoted 1 line
Take "task-core-boot-1.0-r8.qemux86_64.rpm" as an example, and it has
dependency on tinylogin, how can it determine whether it is depends on " tinylogin-1.4-r7.x86_64.rpm" or "tinylogin-1.4-r7.x86.rpm".
In this case, it should not matter which one it uses. If the dependency is on "tinylogin", then either of them fulfills the dependency. RPM should be selecting which one to bring in using it's internal policy manager. (I believe the default is that 64-bit wins...)
I think it DOES matter on which one it uses. Thinking the case that if a user wants to build a pure 64 bit system, and if it could not correctly choose the 64 bit of tinylogin, then his system will be contaminated with 32bit programs/libraries.
Also during my testings, I found rpm will select the "wrong" version (x86 tinylogin).
Thanks,
Dongxiao
Quoted 158 lines
For libraries where it does matter, the dependency system should already be finding the correct architecture for the library.
This does raise an issue in my mind though. Is an architecture for "tasks" justifiable? Why isn't the task-core-boot an all or noarch package?
Is there any difference between a task-core-boot and "lib32-task-core-boot"?
Should we expect a difference between the two?
--Mark
Quoted 68 lines
Thanks,
DongxiaoQuoted 65 lines
--Mark
Quoted 25 lines · Dongxiao Xu
For supporting multilib, architecture information is needed in package require/provide/suggest/recommend fields.
Use DEFAULTTUNE value as the postfix.
For "all" arch recipe, it requires "all" arch recipe with no postfix, but provides all possible multilib archs.
For example, qemu-config:
Requires: rsync
Requires: update-rc.d
Requires: task-core-nfs-server
Requires: distcc
Requires: oprofileui-server
Requires: dbus-x11
Requires: bash
Provides: qemu-config.x86
Provides: qemu-config.x86-64For other recipe like zlib:
Requires: libc6.x86-64 >= 2.13
Provides: zlib.x86-64Quoted 6 lines
[YOCTO #1457]
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 1 + meta/classes/package_rpm.bbclass | 36++++++++++++++++++++++++++++++++++++
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 24
Quoted 9 lines
2 files changed, 37 insertions(+), 0 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 583d76b..76c86b2 100644
meta/classes/multilib.bbclass +0
-0@@ -23,6 +23,7 @@ python multilib_virtclass_handler () { e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) e.data.setVar("SHLIBSDIR_virtclass-multilib-" +variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 27
Quoted 3 lines
meta/classes/multilib.bbclass +1
-0e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant) + e.data.setVar("SAVED_DEFAULTTUNE",e.data.getVar("DEFAULTTUNE",
Quoted 15 lines
meta/classes/multilib.bbclass +1
-0+ True)) e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) +override) }
meta/classes/package_rpm.bbclass +1
-0@@ -350,6 +350,7 @@ package_install_internal_rpm () { python write_specfile () { import textwrap import oe.packagedata + import reQuoted 1 line
Quoted 1 line
meta/classes/package_rpm.bbclass package_install_internal_rpm () { python · line 355
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0# We need a simple way to remove the MLPREFIX from the packagename,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta/classes/package_rpm.bbclass +0
-0# and dependency information...@@ -498,6 +499,8 @@ python write_specfile () { splitname = strip_multilib(pkgname, d)Quoted 7 lines
Quoted 7 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 3 lines
meta/classes/package_rpm.bbclass +2
-0+ defaulttune = bb.data.getVar('DEFAULTTUNE', localdata, True) + splitsummary = (bb.data.getVar('SUMMARY', localdata, True) or
bb.data.getVar('DESCRIPTION', localdata, True)or ".")meta/classes/package_rpm.bbclass python write_specfile () { · line 505
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0splitversion = (bb.data.getVar('PKGV', localdata, True) or"").replace('-', '+')
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0splitrelease = (bb.data.getVar('PKGR', localdata, True) or "")@@
Quoted 7 lines
Quoted 7 lines
meta/classes/package_rpm.bbclass
Quoted 7 lines
-528,6 +531,39 @@ python
write_specfile() {meta/classes/package_rpm.bbclass +0
-0if pkg == d.getVar("PN", True): splitrprovides = splitrprovides + " " +(
d.getVar('ALTERNATIVE_LINK', True)or '') + " " + (d.getVar('ALTERNATIVE_LINKS', True)or '')meta/classes/package_rpm.bbclass +1
-0+ package_arch = bb.data.getVar('PACKAGE_ARCH', localdata,True)
Quoted 2 lines
Quoted 2 lines
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ + splitrprovides = splitrprovides + " " + splitname + "." +defaulttune
Quoted 10 lines
Quoted 10 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 9 lines
meta/classes/package_rpm.bbclass +9
-0+ if package_arch != "all": + pattern = '\([^()]*\)' + prog = re.compile(pattern) + + str_list = [splitrdepends, splitrrecommends, splitrsuggests] + for e in range(len(str_list)): + brackets = prog.findall(str_list[e]) + for i in range(len(brackets)): + str_list[e] = str_list[e].replace(brackets[i],"#BRACKETS"+str(i)+"#")
Quoted 9 lines
Quoted 9 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 9 lines
meta/classes/package_rpm.bbclass +9
-0+ tmp = "" + for i in str_list[e].split(): + if i.startswith("#BRACKETS"): + tmp += " " + str(i) + continue + tmp += " " + str(i) + "." + defaulttune + str_list[e] = tmp + for i in range(len(brackets)): + str_list[e] =str_list[e].replace("#BRACKETS"+str(i)+"#",
Quoted 5 lines
Quoted 5 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 5 lines
meta/classes/package_rpm.bbclass +5
-0+brackets[i]) + + [splitrdepends, splitrrecommends, splitrsuggests] = str_list + else: + variants = (bb.data.getVar("MULTILIB_VARIANTS",localdata,
Quoted 3 lines
Quoted 3 lines
True) or "").split()
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ for variant in variants: + tune =bb.data.getVar("DEFAULTTUNE_virtclass-multilib-" +
Quoted 3 lines
Quoted 3 lines
variant, localdata, True) or ""
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname +"." +
Quoted 2 lines
Quoted 2 lines
tune
meta/classes/package_rpm.bbclass
Quoted 1 line
meta/classes/package_rpm.bbclass +1
-0+ tune = bb.data.getVar("SAVED_DEFAULTTUNE", localdata,True)
Quoted 3 lines
Quoted 3 lines
or ""
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname + "." +tune
Quoted 10 lines
Quoted 10 lines
meta/classes/package_rpm.bbclass python write_specfile () { · line 569
Quoted 4 lines
meta/classes/package_rpm.bbclass +1
-0+ # Gather special src/first package data if srcname == splitname: srcrdepends = splitrdepends_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/3] package_rpm: add architecture info in rpm spec file
Quoted 33 lines · Dongxiao
Hi Mark,
Quoted 31 lines
-----Original Message-----
From: Mark Hatle [mailto:[email protected]]
Sent: Tuesday, September 13, 2011 11:29 PM
To: Xu, Dongxiao
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 1/3]package_rpm: add architecture info in rpm spec fileQuoted 11 lines · Dongxiao
Hi Mark,
Quoted 9 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Monday, September 12, 2011 10:52 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 1/3]package_rpm: add architecture info in rpm spec fileQuoted 8 lines
Quoted 6 lines
This patch is incorrect. Architectural information should not be in the dependencies within RPM packages.
RPM is expected to find the proper version of a package to install based on the existing dependency information. I'm in the process of investigating why certain items are not found properly.
Take "task-core-boot-1.0-r8.qemux86_64.rpm" as an example, and it has
dependency on tinylogin, how can it determine whether it is depends on " tinylogin-1.4-r7.x86_64.rpm" or "tinylogin-1.4-r7.x86.rpm".
Quoted 6 lines
Quoted 4 lines
In this case, it should not matter which one it uses. If the dependency is on "tinylogin", then either of them fulfills the dependency. RPM should be selecting which one to bring in using it's internal policy manager. (I believe the default is that 64-bit wins...)
I think it DOES matter on which one it uses. Thinking the case that if a user wants to build a pure 64 bit system, and if it could not correctly choose the 64 bit of tinylogin, then his system will be contaminated with 32bit programs/libraries.
With the current way oe-core processes packages into images it uses the dependencies.. so no matter what you have built you are only guaranteed that the resulting image contains that final dependency and whatever is needed to make it "work". There is nothing that says (today) that you will get a pure 64-bit or 32-bit system -- other then as an artifact of only building 32-bit or 64-bit software.
There are different strategies we can use to deal with these situations.
1) Resolve the "base" non-multilib system "first", then augment it with the multilib components. This results in a "base system" + alternative packages.
2) Resolve the system as whole, including multilibs, and use the policy components to determine the "best match". (best match may not be working right today) This results in a system based purely on dependency matches.
Either way, our current implementation doesn't quite match either of them. We're closer to the second version of the implementation today....
If the base system approach is what we want, vs the pure dependency based system, then we will need to change the way the dependencies are being resolved and the ordering of the resolution in the packages_rpm.bbclass (or rootfs_rpm.bbclass). Basically:
*) take the list of dependencies and filter out any multilibs, and only scan them against the base archs.
*) add to that resolution any multilib components that had been filtered out and scan against the all archs.
....
*) install as we do today
--Mark
Quoted 164 lines
Also during my testings, I found rpm will select the "wrong" version (x86 tinylogin).
Thanks,
DongxiaoQuoted 158 lines
For libraries where it does matter, the dependency system should already be finding the correct architecture for the library.
This does raise an issue in my mind though. Is an architecture for "tasks" justifiable? Why isn't the task-core-boot an all or noarch package?
Is there any difference between a task-core-boot and "lib32-task-core-boot"?
Should we expect a difference between the two?
--Mark
Quoted 68 lines
Thanks,
DongxiaoQuoted 65 lines
--Mark
Quoted 25 lines · Dongxiao Xu
For supporting multilib, architecture information is needed in package require/provide/suggest/recommend fields.
Use DEFAULTTUNE value as the postfix.
For "all" arch recipe, it requires "all" arch recipe with no postfix, but provides all possible multilib archs.
For example, qemu-config:
Requires: rsync
Requires: update-rc.d
Requires: task-core-nfs-server
Requires: distcc
Requires: oprofileui-server
Requires: dbus-x11
Requires: bash
Provides: qemu-config.x86
Provides: qemu-config.x86-64For other recipe like zlib:
Requires: libc6.x86-64 >= 2.13
Provides: zlib.x86-64Quoted 6 lines
[YOCTO #1457]
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 1 + meta/classes/package_rpm.bbclass | 36++++++++++++++++++++++++++++++++++++
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 24
Quoted 9 lines
2 files changed, 37 insertions(+), 0 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 583d76b..76c86b2 100644
meta/classes/multilib.bbclass +0
-0@@ -23,6 +23,7 @@ python multilib_virtclass_handler () { e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) e.data.setVar("SHLIBSDIR_virtclass-multilib-" +variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 27
Quoted 3 lines
meta/classes/multilib.bbclass +1
-0e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant) + e.data.setVar("SAVED_DEFAULTTUNE",e.data.getVar("DEFAULTTUNE",
Quoted 15 lines
meta/classes/multilib.bbclass +1
-0+ True)) e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) +override) }
meta/classes/package_rpm.bbclass +1
-0@@ -350,6 +350,7 @@ package_install_internal_rpm () { python write_specfile () { import textwrap import oe.packagedata + import reQuoted 1 line
Quoted 1 line
meta/classes/package_rpm.bbclass package_install_internal_rpm () { python · line 355
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0# We need a simple way to remove the MLPREFIX from the packagename,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta/classes/package_rpm.bbclass +0
-0# and dependency information...@@ -498,6 +499,8 @@ python write_specfile () { splitname = strip_multilib(pkgname, d)Quoted 7 lines
Quoted 7 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 3 lines
meta/classes/package_rpm.bbclass +2
-0+ defaulttune = bb.data.getVar('DEFAULTTUNE', localdata, True) + splitsummary = (bb.data.getVar('SUMMARY', localdata, True) or
bb.data.getVar('DESCRIPTION', localdata, True)or ".")meta/classes/package_rpm.bbclass python write_specfile () { · line 505
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0splitversion = (bb.data.getVar('PKGV', localdata, True) or"").replace('-', '+')
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0splitrelease = (bb.data.getVar('PKGR', localdata, True) or "")@@
Quoted 7 lines
Quoted 7 lines
meta/classes/package_rpm.bbclass
Quoted 7 lines
-528,6 +531,39 @@ python
write_specfile() {meta/classes/package_rpm.bbclass +0
-0if pkg == d.getVar("PN", True): splitrprovides = splitrprovides + " " +(
d.getVar('ALTERNATIVE_LINK', True)or '') + " " + (d.getVar('ALTERNATIVE_LINKS', True)or '')meta/classes/package_rpm.bbclass +1
-0+ package_arch = bb.data.getVar('PACKAGE_ARCH', localdata,True)
Quoted 2 lines
Quoted 2 lines
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ + splitrprovides = splitrprovides + " " + splitname + "." +defaulttune
Quoted 10 lines
Quoted 10 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 9 lines
meta/classes/package_rpm.bbclass +9
-0+ if package_arch != "all": + pattern = '\([^()]*\)' + prog = re.compile(pattern) + + str_list = [splitrdepends, splitrrecommends, splitrsuggests] + for e in range(len(str_list)): + brackets = prog.findall(str_list[e]) + for i in range(len(brackets)): + str_list[e] = str_list[e].replace(brackets[i],"#BRACKETS"+str(i)+"#")
Quoted 9 lines
Quoted 9 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 9 lines
meta/classes/package_rpm.bbclass +9
-0+ tmp = "" + for i in str_list[e].split(): + if i.startswith("#BRACKETS"): + tmp += " " + str(i) + continue + tmp += " " + str(i) + "." + defaulttune + str_list[e] = tmp + for i in range(len(brackets)): + str_list[e] =str_list[e].replace("#BRACKETS"+str(i)+"#",
Quoted 5 lines
Quoted 5 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 5 lines
meta/classes/package_rpm.bbclass +5
-0+brackets[i]) + + [splitrdepends, splitrrecommends, splitrsuggests] = str_list + else: + variants = (bb.data.getVar("MULTILIB_VARIANTS",localdata,
Quoted 3 lines
Quoted 3 lines
True) or "").split()
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ for variant in variants: + tune =bb.data.getVar("DEFAULTTUNE_virtclass-multilib-" +
Quoted 3 lines
Quoted 3 lines
variant, localdata, True) or ""
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname +"." +
Quoted 2 lines
Quoted 2 lines
tune
meta/classes/package_rpm.bbclass
Quoted 1 line
meta/classes/package_rpm.bbclass +1
-0+ tune = bb.data.getVar("SAVED_DEFAULTTUNE", localdata,True)
Quoted 3 lines
Quoted 3 lines
or ""
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname + "." +tune
Quoted 10 lines
Quoted 10 lines
meta/classes/package_rpm.bbclass python write_specfile () { · line 569
Quoted 4 lines
meta/classes/package_rpm.bbclass +1
-0+ # Gather special src/first package data if srcname == splitname: srcrdepends = splitrdepends_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/3] package_rpm: add architecture info in rpm spec file
Hi Mark,
Quoted 55 lines
-----Original Message-----
From: Mark Hatle [mailto:[email protected]]
Sent: Tuesday, September 13, 2011 11:59 PM
To: Xu, Dongxiao
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 1/3]package_rpm: add architecture info in rpm spec fileQuoted 16 lines · Dongxiao
Hi Mark,
Quoted 14 lines
-----Original Message-----
From: Mark Hatle [mailto:[email protected]]
Sent: Tuesday, September 13, 2011 11:29 PM
To: Xu, Dongxiao
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 1/3]package_rpm: add architecture info in rpm spec fileQuoted 5 lines · Dongxiao
Hi Mark,
Quoted 3 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] OnBehalf
Quoted 18 lines
Quoted 18 lines
Quoted 9 lines
Quoted 9 lines
Of Mark Hatle
Sent: Monday, September 12, 2011 10:52 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 1/3]package_rpm: add architecture info in rpm spec fileThis patch is incorrect. Architectural information should not be in the dependencies within RPM packages.
Quoted 6 lines
Quoted 3 lines
RPM is expected to find the proper version of a package to install based on the existing dependency information. I'm in the process of investigating why certain items are not found properly.
Take "task-core-boot-1.0-r8.qemux86_64.rpm" as an example, and it has
dependency on tinylogin, how can it determine whether it is depends on " tinylogin-1.4-r7.x86_64.rpm" or "tinylogin-1.4-r7.x86.rpm".
Quoted 7 lines
Quoted 5 lines
In this case, it should not matter which one it uses. If the dependency is on "tinylogin", then either of them fulfills the dependency. RPM should be selecting which one to bring in using it's internal policy manager. (I believe the default is that 64-bit wins...)
I think it DOES matter on which one it uses. Thinking the case that if a user
wants to build a pure 64 bit system, and if it could not correctly choose the 64 bit of tinylogin, then his system will be contaminated with 32bit programs/libraries.
Quoted 6 lines
With the current way oe-core processes packages into images it uses the dependencies.. so no matter what you have built you are only guaranteed that the resulting image contains that final dependency and whatever is needed to make it "work". There is nothing that says (today) that you will get a pure 64-bit or 32-bit system -- other then as an artifact of only building 32-bit or 64-bit software.
Let me take another case as an example during my debugging to this issue.
Thinking that you have built out an base qemux86-64 image, and several lib32 multilib packages. Due to the wrong selection when doing RPM, we have several packages (like libgtk), which need x86-64 version installed, however they are replace by 32bit packages. The do_rootfs process succeeded, but when booting the image, some Xserver programs fail to find /usr/lib64/libgtk.so, because in the system only /usr/lib/libgtk.so is installed, which caused the X start failure.
Quoted 22 lines
There are different strategies we can use to deal with these situations.
1) Resolve the "base" non-multilib system "first", then augment it with the multilib components. This results in a "base system" + alternative packages.
2) Resolve the system as whole, including multilibs, and use the policy components to determine the "best match". (best match may not be working right
today) This results in a system based purely on dependency matches.Either way, our current implementation doesn't quite match either of them. We're closer to the second version of the implementation today....
If the base system approach is what we want, vs the pure dependency based system, then we will need to change the way the dependencies are being resolved and the ordering of the resolution in the packages_rpm.bbclass (or rootfs_rpm.bbclass). Basically:
*) take the list of dependencies and filter out any multilibs, and only scan them against the base archs.
Quoted 6 lines
*) add to that resolution any multilib components that had been filtered out and scan against the all archs.
....
*) install as we do today
I ever tried the second approach to fix the problem, however it failed.
I split the installation into two parts as you mentioned, first part is to install the base arch packages, and it does succeed. The second part is to install resolution to multilib components, when calculating the dependency, we will find "package xxx is already installed" error will be detected again by the "justdb" installation. I think there are wrong RPM dependency when installing lib32 multilib packages. showed as follows:
Processing locale-base-en-us...
Processing locale-base-en-gb...
Processing task-core-boot...
Processing task-core-apps-console...
Processing task-core-ssh-dropbear...
Processing task-core-apps-x11-pimlico...
Processing task-core-x11-sato...
Processing zypper...
Processing task-core-x11-base...
Processing task-core-apps-x11-games...
Processing task-core-apps-x11-core...
Processing task-base-extended...
Processing rpm...
Manifest: /distro/dongxiao/build-ml6/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/rootfs/install/install.manifest
Preparing... ################################################## libc6 ################################################## update-rc.d-dbg ################################################## gst-meta-audio ################################################## pciutils-ids ##################################################
...
...
Processing lib32-connman-gnome...
Processing lib32-task-base-3g...
Processing lib32-task-base-wifi...
Processing lib32-task-base-bluetooth...
Manifest: /distro/dongxiao/build-ml6/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/rootfs/install/install_multilib.manifest
Preparing... ##################################################
error: Install/Erase problems:
package libc6-2.13-r14+svnr14157.x86_64 is already installed
package update-rc.d-dbg-0.7-r4.all is already installed
package gst-meta-audio-0.10-r10.x86_64 is already installed
package pciutils-ids-3.1.7-r2.x86_64 is already installed
package udev-extraconf-0.0-r1.x86_64 is already installed...
Thanks,
Dongxiao
Quoted 171 lines
--Mark
Quoted 1 line
Also during my testings, I found rpm will select the "wrong" version (x86
tinylogin).
Quoted 12 lines
Thanks,
DongxiaoQuoted 8 lines
For libraries where it does matter, the dependency system should already be finding the correct architecture for the library.
This does raise an issue in my mind though. Is an architecture for "tasks" justifiable? Why isn't the task-core-boot an all or noarch package?
Is there any difference between a task-core-boot and
"lib32-task-core-boot"?
Quoted 153 lines
Quoted 152 lines
Should we expect a difference between the two?
--Mark
Quoted 69 lines
Thanks,
DongxiaoQuoted 66 lines
--Mark
Quoted 25 lines · Dongxiao Xu
For supporting multilib, architecture information is needed in package require/provide/suggest/recommend fields.
Use DEFAULTTUNE value as the postfix.
For "all" arch recipe, it requires "all" arch recipe with no postfix, but provides all possible multilib archs.
For example, qemu-config:
Requires: rsync
Requires: update-rc.d
Requires: task-core-nfs-server
Requires: distcc
Requires: oprofileui-server
Requires: dbus-x11
Requires: bash
Provides: qemu-config.x86
Provides: qemu-config.x86-64For other recipe like zlib:
Requires: libc6.x86-64 >= 2.13
Provides: zlib.x86-64Quoted 6 lines
[YOCTO #1457]
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 1 + meta/classes/package_rpm.bbclass | 36++++++++++++++++++++++++++++++++++++
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 24
Quoted 9 lines
2 files changed, 37 insertions(+), 0 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 583d76b..76c86b2 100644
meta/classes/multilib.bbclass +0
-0@@ -23,6 +23,7 @@ python multilib_virtclass_handler () { e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) e.data.setVar("SHLIBSDIR_virtclass-multilib-" +variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant)
meta/classes/multilib.bbclass python multilib_virtclass_handler () { · line 27
Quoted 3 lines
meta/classes/multilib.bbclass +1
-0e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant) + e.data.setVar("SAVED_DEFAULTTUNE",e.data.getVar("DEFAULTTUNE",
Quoted 16 lines
meta/classes/multilib.bbclass +2
-0+ True)) e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) +override) }
meta/classes/package_rpm.bbclass +1
-0@@ -350,6 +350,7 @@ package_install_internal_rpm () { python write_specfile () { import textwrap import oe.packagedata + import reQuoted 1 line
Quoted 1 line
meta/classes/package_rpm.bbclass package_install_internal_rpm () { python · line 355
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0# We need a simple way to remove the MLPREFIX from the packagename,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta/classes/package_rpm.bbclass +0
-0# and dependency information...@@ -498,6 +499,8 @@ python write_specfile () { splitname = strip_multilib(pkgname, d)Quoted 7 lines
Quoted 7 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 3 lines
meta/classes/package_rpm.bbclass +2
-0+ defaulttune = bb.data.getVar('DEFAULTTUNE', localdata, True) + splitsummary = (bb.data.getVar('SUMMARY', localdata, True) or
bb.data.getVar('DESCRIPTION', localdata, True)or ".")meta/classes/package_rpm.bbclass python write_specfile () { · line 505
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0splitversion = (bb.data.getVar('PKGV', localdata, True) or"").replace('-', '+')
Quoted 1 line
meta/classes/package_rpm.bbclass +0
-0splitrelease = (bb.data.getVar('PKGR', localdata, True) or "")@@
Quoted 7 lines
Quoted 7 lines
meta/classes/package_rpm.bbclass
Quoted 7 lines
-528,6 +531,39 @@ python
write_specfile() {meta/classes/package_rpm.bbclass +0
-0if pkg == d.getVar("PN", True): splitrprovides = splitrprovides + " " +(
d.getVar('ALTERNATIVE_LINK', True)or '') + " " + (d.getVar('ALTERNATIVE_LINKS', True)or '')meta/classes/package_rpm.bbclass +1
-0+ package_arch = bb.data.getVar('PACKAGE_ARCH', localdata,True)
Quoted 2 lines
Quoted 2 lines
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ + splitrprovides = splitrprovides + " " + splitname + "." +defaulttune
Quoted 10 lines
Quoted 10 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 9 lines
meta/classes/package_rpm.bbclass +9
-0+ if package_arch != "all": + pattern = '\([^()]*\)' + prog = re.compile(pattern) + + str_list = [splitrdepends, splitrrecommends, splitrsuggests] + for e in range(len(str_list)): + brackets = prog.findall(str_list[e]) + for i in range(len(brackets)): + str_list[e] = str_list[e].replace(brackets[i],"#BRACKETS"+str(i)+"#")
Quoted 9 lines
Quoted 9 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 9 lines
meta/classes/package_rpm.bbclass +9
-0+ tmp = "" + for i in str_list[e].split(): + if i.startswith("#BRACKETS"): + tmp += " " + str(i) + continue + tmp += " " + str(i) + "." + defaulttune + str_list[e] = tmp + for i in range(len(brackets)): + str_list[e] =str_list[e].replace("#BRACKETS"+str(i)+"#",
Quoted 5 lines
Quoted 5 lines
meta/classes/package_rpm.bbclass python write_specfile () {
Quoted 5 lines
meta/classes/package_rpm.bbclass +5
-0+brackets[i]) + + [splitrdepends, splitrrecommends, splitrsuggests] = str_list + else: + variants = (bb.data.getVar("MULTILIB_VARIANTS",localdata,
Quoted 3 lines
Quoted 3 lines
True) or "").split()
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ for variant in variants: + tune =bb.data.getVar("DEFAULTTUNE_virtclass-multilib-" +
Quoted 3 lines
Quoted 3 lines
variant, localdata, True) or ""
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname +"." +
Quoted 2 lines
Quoted 2 lines
tune
meta/classes/package_rpm.bbclass
Quoted 1 line
meta/classes/package_rpm.bbclass +1
-0+ tune = bb.data.getVar("SAVED_DEFAULTTUNE", localdata,True)
Quoted 3 lines
Quoted 3 lines
or ""
meta/classes/package_rpm.bbclass
Quoted 2 lines
meta/classes/package_rpm.bbclass +2
-0+ if tune: + splitrprovides = splitrprovides + " " + splitname + "." +tune
Quoted 11 lines
Quoted 11 lines
meta/classes/package_rpm.bbclass python write_specfile () { · line 569
Quoted 4 lines
meta/classes/package_rpm.bbclass +1
-0+ # Gather special src/first package data if srcname == splitname: srcrdepends = splitrdepends_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-co
re
Re: [PATCH 1/3] package_rpm: add architecture info in rpm spec file
Quoted 2 lines · Dongxiao
Hi Mark,
...trimming the thread a bit...
Quoted 11 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
This patch is incorrect. Architectural information should not be in the dependencies within RPM packages.
RPM is expected to find the proper version of a package to install based on the existing dependency information. I'm in the process of investigating why certain items are not found properly.
Let me take another case as an example during my debugging to this issue.
Thinking that you have built out an base qemux86-64 image, and several lib32 multilib packages. Due to the wrong selection when doing RPM, we have several packages (like libgtk), which need x86-64 version installed, however they are replace by 32bit packages. The
do_rootfsprocess succeeded, but when booting the image, some Xserver programs fail to find/usr/lib64/libgtk.so, because in the system only/usr/lib/libgtk.sois installed, which caused the X start failure.
That is a completely different issue. If applications need the 64-bit libraries and the 32-bit ones are fulfilling the dependencies, then we have a dependency mismatch. Libraries should contain dependency information (within RPM) that properly describe the ELF ABI as an artifact of the dependency generation. This is a defect we should be able to resolve in the package_rpm.bbclass.
I'll attempt to look into it today, unless someone beats me to it.
Quoted 61 lines
Quoted 22 lines
There are different strategies we can use to deal with these situations.
1) Resolve the "base" non-multilib system "first", then augment it with the multilib components. This results in a "base system" + alternative packages.
2) Resolve the system as whole, including multilibs, and use the policy components to determine the "best match". (best match may not be working right
today) This results in a system based purely on dependency matches.Either way, our current implementation doesn't quite match either of them. We're closer to the second version of the implementation today....
If the base system approach is what we want, vs the pure dependency based system, then we will need to change the way the dependencies are being resolved and the ordering of the resolution in the packages_rpm.bbclass (or rootfs_rpm.bbclass). Basically:
*) take the list of dependencies and filter out any multilibs, and only scan them against the base archs.
Quoted 6 lines
*) add to that resolution any multilib components that had been filtered out and scan against the all archs.
....
*) install as we do today
I ever tried the second approach to fix the problem, however it failed.
I split the installation into two parts as you mentioned, first part is to install the base arch packages, and it does succeed. The second part is to install resolution to multilib components, when calculating the dependency, we will find "package xxx is already installed" error will be detected again by the "justdb" installation. I think there are wrong RPM dependency when installing lib32 multilib packages. showed as follows:
Processing locale-base-en-us...
Processing locale-base-en-gb...
Processing task-core-boot...
Processing task-core-apps-console...
Processing task-core-ssh-dropbear...
Processing task-core-apps-x11-pimlico...
Processing task-core-x11-sato...
Processing zypper...
Processing task-core-x11-base...
Processing task-core-apps-x11-games...
Processing task-core-apps-x11-core...
Processing task-base-extended...
Processing rpm...
Manifest: /distro/dongxiao/build-ml6/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/rootfs/install/install.manifestPreparing... ################################################## libc6 ################################################## update-rc.d-dbg ################################################## gst-meta-audio ################################################## pciutils-ids ##################################################...
...
Processing lib32-connman-gnome...
Processing lib32-task-base-3g...
Processing lib32-task-base-wifi...
Processing lib32-task-base-bluetooth...
Manifest: /distro/dongxiao/build-ml6/tmp/work/qemux86_64-poky-linux/core-image-sato-1.0-r0/rootfs/install/install_multilib.manifest
Preparing... ##################################################
error: Install/Erase problems:
Quoted 6 lines
package libc6-2.13-r14+svnr14157.x86_64 is already installed package update-rc.d-dbg-0.7-r4.all is already installed package gst-meta-audio-0.10-r10.x86_64 is already installed package pciutils-ids-3.1.7-r2.x86_64 is already installed package udev-extraconf-0.0-r1.x86_64 is already installed...
This is a bit strange. It should have detected from the resolution code that the item was already installed and doesn't need to be re-installed -- unless the above ELF types are causing this issue as well as the one described above.
--Mark
PATCH 2/3 rpm: add multilib prefix for archs under deploy/rpm
In reply to Dongxiao XuCurrently MACHINE_ARCH deploy folder is unique in multilib system, thus a lib32 version of rpm package will override a normal rpm package if its PACKAGE_ARCH is ${MACHINE_ARCH}.
Define different deploy folder for multilib architectures to avoid the confliction.
--- meta/classes/multilib.bbclass | 5 +++++ meta/classes/rootfs_rpm.bbclass | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-)
meta/classes/multilib.bbclass +5 -0
@@ -77,4 +77,9 @@ 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) }
meta/classes/rootfs_rpm.bbclass +3 -1
@@ -218,7 +218,9 @@ python () { default_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False) if default_tune: localdata.setVar("DEFAULTTUNE", default_tune) - ml_package_archs += localdata.getVar("PACKAGE_ARCHS", True) or "" + localdata.setVar("MACHINE_ARCH", eext[1] + "_" + localdata.getVar("MACHINE_ARCH", False)) + package_archs = localdata.getVar("PACKAGE_ARCHS", True) or "" + ml_package_archs += " " + package_archs #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1], localdata.getVar("PACKAGE_ARCHS", True) or "(none)", overrides)) bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs, d) }
Signature · 1 line
1.7.1
Re: [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpm
Quoted 6 lines · Dongxiao Xu
Currently
MACHINE_ARCHdeploy folder is unique in multilib system, thus a lib32 version of rpm package will override a normal rpm package if itsPACKAGE_ARCHis ${MACHINE_ARCH}.Define different deploy folder for multilib architectures to avoid the confliction.
I'm not sure I understand here. Within the deployment directory is a set of directories for each RPM architecture. Are you saying that we can get two packages that have different contents but the same RPM architecture?
Can you give me an example of what is going wrong?
--Mark
Quoted 35 lines
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 5 +++++ meta/classes/rootfs_rpm.bbclass | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-)meta/classes/multilib.bbclass +5
-0@@ -77,4 +77,9 @@ 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) }meta/classes/rootfs_rpm.bbclass +3
-1@@ -218,7 +218,9 @@ python () { default_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False) if default_tune: localdata.setVar("DEFAULTTUNE", default_tune) - ml_package_archs += localdata.getVar("PACKAGE_ARCHS", True) or "" + localdata.setVar("MACHINE_ARCH", eext[1] + "_" + localdata.getVar("MACHINE_ARCH", False)) + package_archs = localdata.getVar("PACKAGE_ARCHS", True) or "" + ml_package_archs += " " + package_archs #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1], localdata.getVar("PACKAGE_ARCHS", True) or "(none)", overrides)) bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs, d) }
Re: [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpm
Hi Mark,
Quoted 14 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Monday, September 12, 2011 10:56 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 4 lines · Dongxiao Xu
Currently
MACHINE_ARCHdeploy folder is unique in multilib system, thus a lib32 version of rpm package will override a normal rpm package if itsPACKAGE_ARCHis ${MACHINE_ARCH}.
Quoted 7 lines
Quoted 2 lines
Define different deploy folder for multilib architectures to avoid the confliction.
I'm not sure I understand here. Within the deployment directory is a set of directories for each RPM architecture. Are you saying that we can get two packages that have different contents but the same RPM architecture?
Yes, for example the netbase recipe, which the PACKAGE_ARCH = MACHINE_ARCH. Both the normal version of netbase package and the lib32 version are named as "netbase-4.45-r1.qemux86_64.rpm" putting in tmp/deploy/rpm/qemux86-64 directory, so we need to differentiate them.
Thanks,
Dongxiao
Quoted 50 lines
Can you give me an example of what is going wrong?
--Mark
Quoted 25 lines
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 5 +++++ meta/classes/rootfs_rpm.bbclass | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 76c86b2..6ace1fe 100644
meta/classes/multilib.bbclass +5
-0@@ -77,4 +77,9 @@ 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) }(quoted diff) +0
-0b/meta/classes/rootfs_rpm.bbclass index 135ca75..7936d77 100644
meta/classes/rootfs_rpm.bbclass python () { · line 218
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0@@ -218,7 +218,9 @@ python () { default_tune =
localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False)meta/classes/rootfs_rpm.bbclass python () {
Quoted 3 lines
meta/classes/rootfs_rpm.bbclass +0
-1if default_tune: localdata.setVar("DEFAULTTUNE", default_tune) - ml_package_archs += localdata.getVar("PACKAGE_ARCHS",True) or ""
meta/classes/rootfs_rpm.bbclass python () { · line 221
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ localdata.setVar("MACHINE_ARCH", eext[1] + "_" +
localdata.getVar("MACHINE_ARCH", False))meta/classes/rootfs_rpm.bbclass python () { · line 222
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ package_archs = localdata.getVar("PACKAGE_ARCHS", True)or ""
meta/classes/rootfs_rpm.bbclass python () { · line 224
Quoted 2 lines
meta/classes/rootfs_rpm.bbclass +1
-0+ ml_package_archs += " " + package_archs #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1],
localdata.getVar("PACKAGE_ARCHS", True)or "(none)", overrides))meta/classes/rootfs_rpm.bbclass python () { · line 225
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs,d) }
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpm
Quoted 24 lines · Dongxiao
Hi Mark,
Quoted 14 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Monday, September 12, 2011 10:56 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 4 lines · Dongxiao Xu
Currently
MACHINE_ARCHdeploy folder is unique in multilib system, thus a lib32 version of rpm package will override a normal rpm package if itsPACKAGE_ARCHis ${MACHINE_ARCH}.Quoted 7 lines
Quoted 2 lines
Define different deploy folder for multilib architectures to avoid the confliction.
I'm not sure I understand here. Within the deployment directory is a set of directories for each RPM architecture. Are you saying that we can get two packages that have different contents but the same RPM architecture?
Quoted 4 lines
Yes, for example the netbase recipe, which the
PACKAGE_ARCH=MACHINE_ARCH. Both the normal version of netbase package and the lib32 version are named as "netbase-4.45-r1.qemux86_64.rpm" putting in tmp/deploy/rpm/qemux86-64 directory, so we need to differentiate them.
Wow, that is very broken. I think part of the problem is that the arch is used to signify not only ABI (and optimizations), but also machine type in this case.
What we really need is an additional architecture type that handles machine specific packages for each multilib type. I'm really not sure what they would be called or how it would work though.
Anyone have suggestions for naming and processing of these? (I'm almost tempted to say "machine_lib")
--Mark
Quoted 58 lines
Thanks,
DongxiaoQuoted 42 lines
Can you give me an example of what is going wrong?
--Mark
Quoted 25 lines
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 5 +++++ meta/classes/rootfs_rpm.bbclass | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 76c86b2..6ace1fe 100644
meta/classes/multilib.bbclass +5
-0@@ -77,4 +77,9 @@ 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) }(quoted diff) +0
-0b/meta/classes/rootfs_rpm.bbclass index 135ca75..7936d77 100644
meta/classes/rootfs_rpm.bbclass python () { · line 218
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0@@ -218,7 +218,9 @@ python () { default_tune =
localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False)meta/classes/rootfs_rpm.bbclass python () {
Quoted 3 lines
meta/classes/rootfs_rpm.bbclass +0
-1if default_tune: localdata.setVar("DEFAULTTUNE", default_tune) - ml_package_archs += localdata.getVar("PACKAGE_ARCHS",True) or ""
meta/classes/rootfs_rpm.bbclass python () { · line 221
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ localdata.setVar("MACHINE_ARCH", eext[1] + "_" +
localdata.getVar("MACHINE_ARCH", False))meta/classes/rootfs_rpm.bbclass python () { · line 222
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ package_archs = localdata.getVar("PACKAGE_ARCHS", True)or ""
meta/classes/rootfs_rpm.bbclass python () { · line 224
Quoted 2 lines
meta/classes/rootfs_rpm.bbclass +1
-0+ ml_package_archs += " " + package_archs #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1],
localdata.getVar("PACKAGE_ARCHS", True)or "(none)", overrides))Quoted 8 lines
meta/classes/rootfs_rpm.bbclass python () { · line 225
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs,d) }
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpm
Hi Mark,
Quoted 44 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Tuesday, September 13, 2011 1:23 AM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 22 lines · Dongxiao
Hi Mark,
Quoted 20 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Monday, September 12, 2011 10:56 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 6 lines · Dongxiao Xu
Currently
MACHINE_ARCHdeploy folder is unique in multilib system, thus a lib32 version of rpm package will override a normal rpm package if itsPACKAGE_ARCHis ${MACHINE_ARCH}.Define different deploy folder for multilib architectures to avoid the confliction.
I'm not sure I understand here. Within the deployment directory is a set of directories for each RPM architecture. Are you saying that we can get two packages that have different contents but the same RPM
architecture?
Quoted 3 lines
Quoted 1 line
Yes, for example the netbase recipe, which the
PACKAGE_ARCH=
MACHINE_ARCH.Quoted 3 lines
Both the normal version of netbase package and the lib32 version are named as "netbase-4.45-r1.qemux86_64.rpm" putting in tmp/deploy/rpm/qemux86-64 directory, so we need to differentiate them.
Wow, that is very broken. I think part of the problem is that the arch is used to signify not only ABI (and optimizations), but also machine type in this case.
Quoted 6 lines
What we really need is an additional architecture type that handles machine specific packages for each multilib type. I'm really not sure what they would be called or how it would work though.
Anyone have suggestions for naming and processing of these? (I'm almost tempted to say "
machine_lib")
In the weekend I had a talk with Richard and he suggested on adding MLPREFIX to MACHINE_ARCH to differentiate them. Otherwise user need to define a new value for MACHINE_virtclass-multilib-lib32?
Thanks,
Dongxiao
Quoted 68 lines
--Mark
Quoted 41 lines
Thanks,
DongxiaoQuoted 38 lines
Can you give me an example of what is going wrong?
--Mark
Quoted 25 lines
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 5 +++++ meta/classes/rootfs_rpm.bbclass | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 76c86b2..6ace1fe 100644
meta/classes/multilib.bbclass +5
-0@@ -77,4 +77,9 @@ 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) }(quoted diff) +0
-0b/meta/classes/rootfs_rpm.bbclass index 135ca75..7936d77 100644
meta/classes/rootfs_rpm.bbclass python () { · line 218
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0@@ -218,7 +218,9 @@ python () { default_tune =
localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False)meta/classes/rootfs_rpm.bbclass python () {
Quoted 3 lines
meta/classes/rootfs_rpm.bbclass +0
-1if default_tune: localdata.setVar("DEFAULTTUNE", default_tune) - ml_package_archs += localdata.getVar("PACKAGE_ARCHS",True) or ""
meta/classes/rootfs_rpm.bbclass python () { · line 221
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ localdata.setVar("MACHINE_ARCH", eext[1] + "_" +
localdata.getVar("MACHINE_ARCH", False))Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ package_archs = localdata.getVar("PACKAGE_ARCHS",True)
Quoted 13 lines
Quoted 4 lines
or ""
meta/classes/rootfs_rpm.bbclass python () { · line 224
Quoted 2 lines
meta/classes/rootfs_rpm.bbclass +1
-0+ ml_package_archs += " " + package_archs #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1],
localdata.getVar("PACKAGE_ARCHS", True)or "(none)", overrides))Quoted 8 lines
meta/classes/rootfs_rpm.bbclass python () { · line 225
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs,d) }
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpm
Quoted 50 lines · Dongxiao
Hi Mark,
Quoted 48 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Tuesday, September 13, 2011 1:23 AM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 22 lines · Dongxiao
Hi Mark,
Quoted 20 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Monday, September 12, 2011 10:56 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 6 lines · Dongxiao Xu
Currently
MACHINE_ARCHdeploy folder is unique in multilib system, thus a lib32 version of rpm package will override a normal rpm package if itsPACKAGE_ARCHis ${MACHINE_ARCH}.Define different deploy folder for multilib architectures to avoid the confliction.
I'm not sure I understand here. Within the deployment directory is a set of directories for each RPM architecture. Are you saying that we can get two packages that have different contents but the same RPM
architecture?
Quoted 3 lines
Quoted 1 line
Yes, for example the netbase recipe, which the
PACKAGE_ARCH=
MACHINE_ARCH.Quoted 3 lines
Both the normal version of netbase package and the lib32 version are named as "netbase-4.45-r1.qemux86_64.rpm" putting in tmp/deploy/rpm/qemux86-64 directory, so we need to differentiate them.
Wow, that is very broken. I think part of the problem is that the arch is used to signify not only ABI (and optimizations), but also machine type in this case.
What we really need is an additional architecture type that handles machine specific packages for each multilib type. I'm really not sure what they would be called or how it would work though.
Quoted 5 lines
Quoted 2 lines
Anyone have suggestions for naming and processing of these? (I'm almost tempted to say "
machine_lib")In the weekend I had a talk with Richard and he suggested on adding MLPREFIX to
MACHINE_ARCHto differentiate them. Otherwise user need to define a new value for MACHINE_virtclass-multilib-lib32?
I can't think of a better solution for this right now. Note, that if the MLPREFIX is added to the MACHINE_ARCH, a corresponding change to Zypper will be needed as well.
--Mark
Quoted 76 lines
Thanks,
DongxiaoQuoted 64 lines
--Mark
Quoted 41 lines
Thanks,
DongxiaoQuoted 38 lines
Can you give me an example of what is going wrong?
--Mark
Quoted 25 lines
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 5 +++++ meta/classes/rootfs_rpm.bbclass | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 76c86b2..6ace1fe 100644
meta/classes/multilib.bbclass +5
-0@@ -77,4 +77,9 @@ 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) }(quoted diff) +0
-0b/meta/classes/rootfs_rpm.bbclass index 135ca75..7936d77 100644
meta/classes/rootfs_rpm.bbclass python () { · line 218
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0@@ -218,7 +218,9 @@ python () { default_tune =
localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False)meta/classes/rootfs_rpm.bbclass python () {
Quoted 3 lines
meta/classes/rootfs_rpm.bbclass +0
-1if default_tune: localdata.setVar("DEFAULTTUNE", default_tune) - ml_package_archs += localdata.getVar("PACKAGE_ARCHS",True) or ""
meta/classes/rootfs_rpm.bbclass python () { · line 221
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ localdata.setVar("MACHINE_ARCH", eext[1] + "_" +
localdata.getVar("MACHINE_ARCH", False))Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ package_archs = localdata.getVar("PACKAGE_ARCHS",True)
Quoted 13 lines
Quoted 4 lines
or ""
meta/classes/rootfs_rpm.bbclass python () { · line 224
Quoted 2 lines
meta/classes/rootfs_rpm.bbclass +1
-0+ ml_package_archs += " " + package_archs #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1],
localdata.getVar("PACKAGE_ARCHS", True)or "(none)", overrides))Quoted 8 lines
meta/classes/rootfs_rpm.bbclass python () { · line 225
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs,d) }
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpm
Hi Mark,
Quoted 66 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Tuesday, September 13, 2011 11:24 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 17 lines · Dongxiao
Hi Mark,
Quoted 15 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Tuesday, September 13, 2011 1:23 AM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 5 lines · Dongxiao
Hi Mark,
Quoted 3 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] OnBehalf
Quoted 21 lines
Quoted 21 lines
Quoted 11 lines
Quoted 11 lines
Of Mark Hatle
Sent: Monday, September 12, 2011 10:56 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 4 lines · Dongxiao Xu
Currently
MACHINE_ARCHdeploy folder is unique in multilib system, thus a lib32 version of rpm package will override a normal rpm package if itsPACKAGE_ARCHis ${MACHINE_ARCH}.Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Define different deploy folder for multilib architectures to avoid the confliction.
I'm not sure I understand here. Within the deployment directory is a set of directories for each RPM architecture. Are you saying that we can get two packages that have different contents but the same RPM
architecture?
Quoted 2 lines
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Yes, for example the netbase recipe, which the
PACKAGE_ARCH=
MACHINE_ARCH.Quoted 3 lines
Both the normal version of netbase package and the lib32 version are named as "netbase-4.45-r1.qemux86_64.rpm" putting in tmp/deploy/rpm/qemux86-64 directory, so we need to differentiate them.
Wow, that is very broken. I think part of the problem is that the arch is used to signify not only ABI (and optimizations), but also machine
type in this case.
Quoted 8 lines
Quoted 7 lines
What we really need is an additional architecture type that handles machine specific packages for each multilib type. I'm really not sure what they would be called or how it would work though.
Anyone have suggestions for naming and processing of these? (I'm almost tempted to say "
machine_lib")
Quoted 8 lines
Quoted 1 line
In the weekend I had a talk with Richard and he suggested on adding
MLPREFIX to
MACHINE_ARCHto differentiate them.Quoted 1 line
Otherwise user need to define a new value for
MACHINE_virtclass-multilib-lib32?
I can't think of a better solution for this right now. Note, that if the MLPREFIX is added to the
MACHINE_ARCH, a corresponding change to Zypper will be needed as well.
I tried this approach by defining 'MACHINE_virtclass-multilib-lib32="qemux86"' in local.conf, and it works. Therefore we will have qemux86, qemux86-64, x86, x86-64, and all architectures under tmp/deploy/rpm folder.
Does zypper work with this approach?
Thanks,
Dongxiao
Quoted 90 lines
--Mark
Quoted 44 lines
Thanks,
DongxiaoQuoted 41 lines
--Mark
Quoted 38 lines
Thanks,
DongxiaoQuoted 35 lines
Can you give me an example of what is going wrong?
--Mark
Quoted 25 lines
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 5 +++++ meta/classes/rootfs_rpm.bbclass | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 76c86b2..6ace1fe 100644
meta/classes/multilib.bbclass +5
-0@@ -77,4 +77,9 @@ 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) }(quoted diff) +0
-0b/meta/classes/rootfs_rpm.bbclass index 135ca75..7936d77 100644
meta/classes/rootfs_rpm.bbclass python () { · line 218
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0@@ -218,7 +218,9 @@ python () { default_tune =
localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False)Quoted 3 lines
meta/classes/rootfs_rpm.bbclass +0
-1if default_tune: localdata.setVar("DEFAULTTUNE", default_tune) - ml_package_archs +=localdata.getVar("PACKAGE_ARCHS",
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
Quoted 4 lines
True) or ""
meta/classes/rootfs_rpm.bbclass python () { · line 221
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ localdata.setVar("MACHINE_ARCH", eext[1] + "_" +
localdata.getVar("MACHINE_ARCH", False))Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ package_archs = localdata.getVar("PACKAGE_ARCHS",True)
Quoted 5 lines
Quoted 5 lines
or ""
meta/classes/rootfs_rpm.bbclass python () { · line 224
Quoted 2 lines
meta/classes/rootfs_rpm.bbclass +1
-0+ ml_package_archs += " " + package_archs #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1],
localdata.getVar("PACKAGE_ARCHS", True)or "(none)", overrides))Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0bb.data.setVar('MULTILIB_PACKAGE_ARCHS',
ml_package_archs,Quoted 21 lines
Quoted 16 lines
Quoted 9 lines
Quoted 8 lines
d) }
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-co
reQuoted 5 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-cor
eQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpm
Quoted 73 lines · Dongxiao
Hi Mark,
Quoted 71 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Tuesday, September 13, 2011 11:24 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 17 lines · Dongxiao
Hi Mark,
Quoted 15 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Hatle
Sent: Tuesday, September 13, 2011 1:23 AM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 5 lines · Dongxiao
Hi Mark,
Quoted 3 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] OnBehalf
Quoted 21 lines
Quoted 21 lines
Quoted 11 lines
Quoted 11 lines
Of Mark Hatle
Sent: Monday, September 12, 2011 10:56 PM
To: [email protected]
Subject: Re: [OE-core] [PATCH 2/3] rpm: add multilib prefix for archs under deploy/rpmQuoted 4 lines · Dongxiao Xu
Currently
MACHINE_ARCHdeploy folder is unique in multilib system, thus a lib32 version of rpm package will override a normal rpm package if itsPACKAGE_ARCHis ${MACHINE_ARCH}.Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Define different deploy folder for multilib architectures to avoid the confliction.
I'm not sure I understand here. Within the deployment directory is a set of directories for each RPM architecture. Are you saying that we can get two packages that have different contents but the same RPM
architecture?
Quoted 2 lines
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Yes, for example the netbase recipe, which the
PACKAGE_ARCH=
MACHINE_ARCH.Quoted 3 lines
Both the normal version of netbase package and the lib32 version are named as "netbase-4.45-r1.qemux86_64.rpm" putting in tmp/deploy/rpm/qemux86-64 directory, so we need to differentiate them.
Wow, that is very broken. I think part of the problem is that the arch is used to signify not only ABI (and optimizations), but also machine
type in this case.
Quoted 9 lines
Quoted 7 lines
What we really need is an additional architecture type that handles machine specific packages for each multilib type. I'm really not sure what they would be called or how it would work though.
Anyone have suggestions for naming and processing of these? (I'm almost tempted to say "
machine_lib")In the weekend I had a talk with Richard and he suggested on adding
MLPREFIX to
MACHINE_ARCHto differentiate them.Quoted 1 line
Otherwise user need to define a new value for
MACHINE_virtclass-multilib-lib32?
Quoted 7 lines
Quoted 3 lines
I can't think of a better solution for this right now. Note, that if the MLPREFIX is added to the
MACHINE_ARCH, a corresponding change to Zypper will be needed as well.I tried this approach by defining 'MACHINE_virtclass-multilib-lib32="qemux86"' in local.conf, and it works. Therefore we will have qemux86, qemux86-64, x86, x86-64, and all architectures under tmp/deploy/rpm folder.
Does zypper work with this approach?
This should work, we just need to ensure that zypper/libzypp are paying attention to the MACHINE... type(s) as well. There is a small chunk of code within the libzypp recipe that generates a table of available/compatible architectures. This is what will need to be updated.
(I do think the MACHINE_virtclass change you made is likely the best approach right now.)
--Mark
Quoted 93 lines
Thanks,
DongxiaoQuoted 90 lines
--Mark
Quoted 44 lines
Thanks,
DongxiaoQuoted 41 lines
--Mark
Quoted 38 lines
Thanks,
DongxiaoQuoted 35 lines
Can you give me an example of what is going wrong?
--Mark
Quoted 25 lines
Signed-off-by Dongxiao Xu <[email protected]>--- meta/classes/multilib.bbclass | 5 +++++ meta/classes/rootfs_rpm.bbclass | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-)(quoted diff) +0
-0b/meta/classes/multilib.bbclass index 76c86b2..6ace1fe 100644
meta/classes/multilib.bbclass +5
-0@@ -77,4 +77,9 @@ 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) }(quoted diff) +0
-0b/meta/classes/rootfs_rpm.bbclass index 135ca75..7936d77 100644
meta/classes/rootfs_rpm.bbclass python () { · line 218
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0@@ -218,7 +218,9 @@ python () { default_tune =
localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False)Quoted 3 lines
meta/classes/rootfs_rpm.bbclass +0
-1if default_tune: localdata.setVar("DEFAULTTUNE", default_tune) - ml_package_archs +=localdata.getVar("PACKAGE_ARCHS",
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
Quoted 4 lines
True) or ""
meta/classes/rootfs_rpm.bbclass python () { · line 221
Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ localdata.setVar("MACHINE_ARCH", eext[1] + "_" +
localdata.getVar("MACHINE_ARCH", False))Quoted 1 line
meta/classes/rootfs_rpm.bbclass +1
-0+ package_archs = localdata.getVar("PACKAGE_ARCHS",True)
Quoted 5 lines
Quoted 5 lines
or ""
meta/classes/rootfs_rpm.bbclass python () { · line 224
Quoted 2 lines
meta/classes/rootfs_rpm.bbclass +1
-0+ ml_package_archs += " " + package_archs #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1],
localdata.getVar("PACKAGE_ARCHS", True)or "(none)", overrides))Quoted 1 line
meta/classes/rootfs_rpm.bbclass +0
-0bb.data.setVar('MULTILIB_PACKAGE_ARCHS',
ml_package_archs,Quoted 21 lines
Quoted 16 lines
Quoted 9 lines
Quoted 8 lines
d) }
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-co
reQuoted 5 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-cor
eQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-coreQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
PATCH 3/3 multilib: install MULTILIB_PACKAGE_INSTALL
In reply to Dongxiao XuIf user set MULTILIB_PACKAGE_INSTALL, we need to install those multitlib packages into the final image.
Also fix the logic in handling multilib prefix. For certain case like a normal image contains several multilib libraries, the image recipe isn't extended with MLPREFIX, therefore we need to enumerate the possible multilib prefixes and compare them with package prefixes.
--- meta/classes/package_rpm.bbclass | 42 +++++++++++++++++++++++++------------ meta/classes/rootfs_rpm.bbclass | 4 +++ 2 files changed, 32 insertions(+), 14 deletions(-)
meta/classes/package_rpm.bbclass +28 -14
@@ -166,7 +166,7 @@ package_install_internal_rpm () { local platform="${INSTALL_PLATFORM_RPM}" local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}" local confbase="${INSTALL_CONFBASE_RPM}" - local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}" + local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM} ${INSTALL_PACKAGES_MULTILIB_RPM}" local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}" local package_linguas="${INSTALL_PACKAGES_LINGUAS_RPM}" local providename="${INSTALL_PROVIDENAME_RPM}"
@@ -210,10 +210,15 @@ package_install_internal_rpm () { echo "Processing $pkg..." archvar=base_archs - ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,") - if [ "${ml_pkg}" != "${pkg}" ]; then - archvar=ml_archs - fi + ml_prefix=`echo ${pkg} | cut -d'-' -f1` + ml_pkg=$pkg + for i in ${MULTILIB_PREFIX_LIST} ; do + if [ ${ml_prefix} == ${i} ]; then + ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,") + archvar=ml_archs + break + fi + done pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) if [ -z "$pkg_name" ]; then
@@ -224,16 +229,20 @@ package_install_internal_rpm () { done fi fi - if [ ! -z "${package_to_install}" ]; then for pkg in ${package_to_install} ; do echo "Processing $pkg..." archvar=base_archs - ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,") - if [ "${ml_pkg}" != "${pkg}" ]; then - archvar=ml_archs - fi + ml_prefix=`echo ${pkg} | cut -d'-' -f1` + ml_pkg=$pkg + for i in ${MULTILIB_PREFIX_LIST} ; do + if [ ${ml_prefix} == ${i} ]; then + ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,") + archvar=ml_archs + break + fi + done pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) if [ -z "$pkg_name" ]; then
@@ -258,10 +267,15 @@ package_install_internal_rpm () { for pkg in ${package_attemptonly} ; do echo "Processing $pkg..." archvar=base_archs - ml_pkg=$(echo ${pkg} | sed "s,^${MLPREFIX}\(.*\),\1,") - if [ "${ml_pkg}" != "${pkg}" ]; then - archvar=ml_archs - fi + ml_prefix=`echo ${pkg} | cut -d'-' -f1` + ml_pkg=$pkg + for i in ${MULTILIB_PREFIX_LIST} ; do + if [ ${ml_prefix} == ${i} ]; then + ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,") + archvar=ml_archs + break + fi + done pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg}) if [ -z "$pkg_name" ]; then
meta/classes/rootfs_rpm.bbclass +4 -0
@@ -58,6 +58,7 @@ fakeroot rootfs_rpm_do_rootfs () { export INSTALL_PLATFORM_RPM="${TARGET_ARCH}" export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}" + export INSTALL_PACKAGES_MULTILIB_RPM="${MULTILIB_PACKAGE_INSTALL}" export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}" export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}" export INSTALL_PROVIDENAME_RPM=""
@@ -210,6 +211,7 @@ python () { bb.data.setVar('RPM_POSTPROCESS_COMMANDS', '', d) ml_package_archs = "" + ml_prefix_list = "" multilibs = d.getVar('MULTILIBS', True) or "" for ext in multilibs.split(): eext = ext.split(':')
@@ -221,6 +223,8 @@ python () { localdata.setVar("MACHINE_ARCH", eext[1] + "_" + localdata.getVar("MACHINE_ARCH", False)) package_archs = localdata.getVar("PACKAGE_ARCHS", True) or "" 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)) bb.data.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs, d) + bb.data.setVar('MULTILIB_PREFIX_LIST', ml_prefix_list, d) }
Signature · 1 line
1.7.1