[OE-core] [PATCH 6/7] package_rpm: fix strip_multilib function

Dongxiao Xu dongxiao.xu at intel.com
Wed Aug 3 15:19:38 UTC 2011


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]. This commit change it to strip all
elements' multilib prefix.

CC: Mark Hatle <mark.hatle at windriver.com>
Signed-off-by: Dongxiao Xu <dongxiao.xu at intel.com>
---
 meta/classes/package_rpm.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9d0eeba..a29ce9d 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -326,7 +326,7 @@ python write_specfile () {
 		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:])
+				name = " ".join(name.split(eext[1] + '-')[1:])
 		return name
 
 #		ml = bb.data.getVar("MLPREFIX", d, True)
@@ -720,7 +720,7 @@ python do_package_rpm () {
 	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:])
+			return " ".join(name.split(ml)[1:])
 		return name
 
 	workdir = bb.data.getVar('WORKDIR', d, True)
-- 
1.7.1





More information about the Openembedded-core mailing list