Skip to contentSkip to conversation

multilib: RPM rootfs related fixes.

GIT PULL New Dongxiao Xu 2 participants 6 messages Aug 16, 2011

lore
Share & tools
lore
#0 lore raw

Hi Richard and Mark,

This pull request fixes some multilib issues related with RPM rootfs. Please help to review and pull.

Changes from v1:
1) Remove the original patch "multilib: remove MULTILIB_PACKAGE_ARCHS variable".
2) Add a new patch "rootfs_rpm: Fix DEFAULTTUNE setting in multilib case"
3) For the two package_rpm related patches, The first patch is to change strip_multilib functionality, and the second patch is to handle the package rename issue in multilib.
4) Add a new patch "gtk-icon-cache: Adding MLPREFIX when dynamically set RDEPENDS" to fix the dynamic setting of RDEPENDS in multilib case.

[YOCTO #1368]

Thanks,
Dongxiao

The following changes since commit 13db5f420ca9bff98561f80d78958278734ad1f4:

distro-tracking: Update info for gpgme, libassuan, apr... after last upgrade. (2011-08-15 15:26:04 +0100)

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

Dongxiao Xu (4):
rootfs_rpm: Fix DEFAULTTUNE setting in multilib case
package_rpm: enhance strip_multilib function
package_rpm: Fix package rename issue in multilib case
gtk-icon-cache: Adding MLPREFIX when dynamically set RDEPENDS

 meta/classes/gtk-icon-cache.bbclass |    2 +-
 meta/classes/package_rpm.bbclass    |   22 +++++++++++-----------
 meta/classes/rootfs_rpm.bbclass     |    4 ----
 3 files changed, 12 insertions(+), 16 deletions(-)
#1 lore raw

PATCH 1/4 rootfs_rpm: Fix DEFAULTTUNE setting in multilib case

"virtclass-multilib" is set to OVERRIDES in multilib.bbclass, remove the duplicated settings here.

Besides, DEFAULTTUNE has overrided and it can be directly used.

[YOCTO #1368]

---
 meta/classes/rootfs_rpm.bbclass |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
meta/classes/rootfs_rpm.bbclass +0 -4
index 7c06064..7f24b9c 100644
@@ -215,10 +215,6 @@ python () {
         eext = ext.split(':')
         if len(eext) > 1 and eext[0] == 'multilib':
             localdata = bb.data.createCopy(d)
-            overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + eext[1]
-            localdata.setVar("OVERRIDES", overrides)
-            # TEMP: OVERRIDES isn't working right
-            localdata.setVar("DEFAULTTUNE", localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + eext[1], False) or "")
             ml_package_archs += localdata.getVar("PACKAGE_ARCHS", True) or ""
             #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
#2 lore raw

PATCH 2/4 package_rpm: enhance strip_multilib function

In reply to Dongxiao Xu

The previous logic could only strip MLPREFIX from the first element in an array, take an example, strip_multilib the [lib32-a lib32-b lib32-c] will result in [a lib32-b lib32-c]. We need to strip prefix one by one.

This commit change the logic to strip all elements' multilib prefix.

[YOCTO #1368]

---
 meta/classes/package_rpm.bbclass |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
meta/classes/package_rpm.bbclass +4 -4
index b15786d..7a0c6da 100644
@@ -357,8 +357,8 @@ python write_specfile () {
 		multilibs = d.getVar('MULTILIBS', True) or ""
 		for ext in multilibs.split():
 			eext = ext.split(':')
-			if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') == 0:
-				name = (eext[1] + '-').join(name.split(eext[1] + '-', 1)[1:])
+			if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') >= 0:
+				name = "".join(name.split(eext[1] + '-'))
 		return name
 
 #		ml = bb.data.getVar("MLPREFIX", d, True)
@@ -755,8 +755,8 @@ python do_package_rpm () {
 	# and dependency information...
 	def strip_multilib(name, d):
 		ml = bb.data.getVar("MLPREFIX", d, True)
-		if ml and name and len(ml) != 0 and name.find(ml) == 0:
-			return ml.join(name.split(ml, 1)[1:])
+		if ml and name and len(ml) != 0 and name.find(ml) >= 0:
+			return "".join(name.split(ml))
 		return name
 
 	workdir = bb.data.getVar('WORKDIR', d, True)
Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/4 package_rpm: Fix package rename issue in multilib case

In reply to Dongxiao Xu

do_package task will write information into pkgdata and do_package_write_rpm will read them out. Take lib32-dates as an example, one of its RDEPENDS is li32-gtk+, and PKG_lib32-gtk+ = "libgtk-2.0", these info is stored at:
tmp/pkgdata/x86_64-pokymllib32-linux/runtime/lib32-dates.

Function "mapping_rename_hook" in do_package_write_rpm is to handle those renamed packages. However before it executes, translate_vers has stripped the multilib prefix out, making it failed to find PKG_gtk+ value in pkgdata.

This commit moves the strip_multilib out of translate_vers and call it after "mapping_rename_hook".

[YOCTO #1368]

---
 meta/classes/package_rpm.bbclass |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
meta/classes/package_rpm.bbclass +7 -7
index 7a0c6da..9ef1acd 100644
@@ -394,7 +394,7 @@ python write_specfile () {
 							pv = subd['PKGV']
 							reppv = pv.replace('-', '+')
 							ver = ver.replace(pv, reppv)
-				newdeps_dict[strip_multilib(dep, d)] = ver
+				newdeps_dict[dep] = ver
 			depends = bb.utils.join_deps(newdeps_dict)
 			bb.data.setVar(varname, depends.strip(), d)
 
@@ -516,12 +516,12 @@ python write_specfile () {
 		# Map the dependencies into their final form
 		bb.build.exec_func("mapping_rename_hook", localdata)
 
-		splitrdepends    = bb.data.getVar('RDEPENDS', localdata, True) or ""
-		splitrrecommends = bb.data.getVar('RRECOMMENDS', localdata, True) or ""
-		splitrsuggests   = bb.data.getVar('RSUGGESTS', localdata, True) or ""
-		splitrprovides   = bb.data.getVar('RPROVIDES', localdata, True) or ""
-		splitrreplaces   = bb.data.getVar('RREPLACES', localdata, True) or ""
-		splitrconflicts  = bb.data.getVar('RCONFLICTS', localdata, True) or ""
+		splitrdepends    = strip_multilib(bb.data.getVar('RDEPENDS', localdata, True), d) or ""
+		splitrrecommends = strip_multilib(bb.data.getVar('RRECOMMENDS', localdata, True), d) or ""
+		splitrsuggests   = strip_multilib(bb.data.getVar('RSUGGESTS', localdata, True), d) or ""
+		splitrprovides   = strip_multilib(bb.data.getVar('RPROVIDES', localdata, True), d) or ""
+		splitrreplaces   = strip_multilib(bb.data.getVar('RREPLACES', localdata, True), d) or ""
+		splitrconflicts  = strip_multilib(bb.data.getVar('RCONFLICTS', localdata, True), d) or ""
 		splitrobsoletes  = []
 
 		# For now we need to manually supplement RPROVIDES with any update-alternatives links
Signature · 1 line
1.7.1
#4 lore raw

PATCH 4/4 gtk-icon-cache: Adding MLPREFIX when dynamically set RDEPENDS

In reply to Dongxiao Xu

When dynamically setting RDEPENDS, we need to add MLPREFIX to adapt multilib case.

[YOCTO #1368]

---
 meta/classes/gtk-icon-cache.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/gtk-icon-cache.bbclass +1 -1
index 3bfb8ff..d0840d5 100644
@@ -38,7 +38,7 @@ python populate_packages_append () {
 
 		bb.note("adding hicolor-icon-theme dependency to %s" % pkg)	
 		rdepends = bb.data.getVar('RDEPENDS_%s' % pkg, d, 1)
-		rdepends += " hicolor-icon-theme"
+		rdepends = rdepends + ' ' + bb.data.getVar('MLPREFIX', d) + "hicolor-icon-theme"
 		bb.data.setVar('RDEPENDS_%s' % pkg, rdepends, d)
 	
 		bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
Signature · 1 line
1.7.1
Acked-by
#5 lore raw
In reply to Dongxiao Xu
Quoted 13 lines · Dongxiao Xu

Hi Richard and Mark,

This pull request fixes some multilib issues related with RPM rootfs. Please help to review and pull.

Changes from v1:
1) Remove the original patch "multilib: remove MULTILIB_PACKAGE_ARCHS variable".
2) Add a new patch "rootfs_rpm: Fix DEFAULTTUNE setting in multilib case"
3) For the two package_rpm related patches, The first patch is to change strip_multilib functionality, and the second patch is to handle the package rename issue in multilib.
4) Add a new patch "gtk-icon-cache: Adding MLPREFIX when dynamically set RDEPENDS" to fix the dynamic setting of RDEPENDS in multilib case.

Quoted 1 line

[YOCTO #1368]

I assume this has been tests...

It looks fine here..

Quoted 27 lines

Thanks,
Dongxiao

The following changes since commit 13db5f420ca9bff98561f80d78958278734ad1f4:

distro-tracking: Update info for gpgme, libassuan, apr... after last upgrade. (2011-08-15 15:26:04 +0100)

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

Dongxiao Xu (4):
rootfs_rpm: Fix DEFAULTTUNE setting in multilib case
package_rpm: enhance strip_multilib function
package_rpm: Fix package rename issue in multilib case
gtk-icon-cache: Adding MLPREFIX when dynamically set RDEPENDS

 meta/classes/gtk-icon-cache.bbclass |    2 +-
 meta/classes/package_rpm.bbclass    |   22 +++++++++++-----------
 meta/classes/rootfs_rpm.bbclass     |    4 ----
 3 files changed, 12 insertions(+), 16 deletions(-)

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core