summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2011-08-03 22:52:48 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-17 15:14:55 +0100
commitc228ffb3f10c97456cacb4f071269decbda5b88f (patch)
treedcc19cdec845613722c027d46d40754ad4836ea6 /meta/classes
parentb51e8344ca6a20adfc4cb0f504d0dee4f77b1f61 (diff)
downloadpoky-c228ffb3f10c97456cacb4f071269decbda5b88f.tar.gz
package_rpm: enhance strip_multilib function
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] CC: Mark Hatle <mark.hatle@windriver.com> (From OE-Core rev: ca729de4b261e4feba74fdf0b2578890bc80ea90) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_rpm.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b15786d165..7a0c6daae1 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -357,8 +357,8 @@ python write_specfile () {
357 multilibs = d.getVar('MULTILIBS', True) or "" 357 multilibs = d.getVar('MULTILIBS', True) or ""
358 for ext in multilibs.split(): 358 for ext in multilibs.split():
359 eext = ext.split(':') 359 eext = ext.split(':')
360 if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') == 0: 360 if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') >= 0:
361 name = (eext[1] + '-').join(name.split(eext[1] + '-', 1)[1:]) 361 name = "".join(name.split(eext[1] + '-'))
362 return name 362 return name
363 363
364# ml = bb.data.getVar("MLPREFIX", d, True) 364# ml = bb.data.getVar("MLPREFIX", d, True)
@@ -755,8 +755,8 @@ python do_package_rpm () {
755 # and dependency information... 755 # and dependency information...
756 def strip_multilib(name, d): 756 def strip_multilib(name, d):
757 ml = bb.data.getVar("MLPREFIX", d, True) 757 ml = bb.data.getVar("MLPREFIX", d, True)
758 if ml and name and len(ml) != 0 and name.find(ml) == 0: 758 if ml and name and len(ml) != 0 and name.find(ml) >= 0:
759 return ml.join(name.split(ml, 1)[1:]) 759 return "".join(name.split(ml))
760 return name 760 return name
761 761
762 workdir = bb.data.getVar('WORKDIR', d, True) 762 workdir = bb.data.getVar('WORKDIR', d, True)