mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
b51e8344ca
commit
c228ffb3f1
@@ -357,8 +357,8 @@ python write_specfile () {
|
|||||||
multilibs = d.getVar('MULTILIBS', True) or ""
|
multilibs = d.getVar('MULTILIBS', True) or ""
|
||||||
for ext in multilibs.split():
|
for ext in multilibs.split():
|
||||||
eext = ext.split(':')
|
eext = ext.split(':')
|
||||||
if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') == 0:
|
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] + '-'))
|
||||||
return name
|
return name
|
||||||
|
|
||||||
# ml = bb.data.getVar("MLPREFIX", d, True)
|
# ml = bb.data.getVar("MLPREFIX", d, True)
|
||||||
@@ -755,8 +755,8 @@ python do_package_rpm () {
|
|||||||
# and dependency information...
|
# and dependency information...
|
||||||
def strip_multilib(name, d):
|
def strip_multilib(name, d):
|
||||||
ml = bb.data.getVar("MLPREFIX", d, True)
|
ml = bb.data.getVar("MLPREFIX", d, True)
|
||||||
if ml and name and len(ml) != 0 and name.find(ml) == 0:
|
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))
|
||||||
return name
|
return name
|
||||||
|
|
||||||
workdir = bb.data.getVar('WORKDIR', d, True)
|
workdir = bb.data.getVar('WORKDIR', d, True)
|
||||||
|
|||||||
Reference in New Issue
Block a user