diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2018-01-08 17:33:00 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-11 10:26:06 +0000 |
commit | 0ad91af4066e1dd15a3d0f878788867a33189307 (patch) | |
tree | 3461e3dceb3ecb9456583cc07a9dbcdd6ca69bf4 | |
parent | 0d0984e1e616c9f1c211b7b980ba2ca54c096e6e (diff) | |
download | poky-0ad91af4066e1dd15a3d0f878788867a33189307.tar.gz |
sstate.bbclass: sstate_hardcode_path(): fix for multilib
It only substituted staging_target for target recipe which didn't work
for multilib, for example, postinst-useradd-lib32-polkit:
* No multilib:
PATH=/path/to/tmp-glibc/work/core2-64-wrs-linux/polkit/0.113-r0/recipe-sysroot-native/bin
staging_target=/path/to/tmp-glibc/work/core2-64-wrs-linux/polkit/0.113-r0/recipe-sysroot
The PATH would be substituted to:
FIXMESTAGINGDIRTARGET-native/bin
Not the funny "-native/bin", this works well.
* When multilib:
PATH=/path/to/tmp-glibc/work/core2-32-wrsmllib32-linux/lib32-polkit/0.113-r0/recipe-sysroot-native/bin
staging_target=/path/to/tmp-glibc/work/core2-32-wrsmllib32-linux/lib32-polkit/0.113-r0/lib32-recipe-sysroot
Now staging_target endswith "/lib32-recipe-sysroot", so it can't
replace '/recipe-sysroot-native' in PATH , so PATH can't be fixed, and
there would be build errors when building multilib + rm_work, for
example:
chown: invalid user: ‘polkitd:root’
Substitute staging_host for target recipe can fix the problem, now all
of native, cross and target need substitute staging_host, so we can
simply the code a little.
(From OE-Core rev: 087510795331fa21ff52f103269087c06b1660fa)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/sstate.bbclass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 65f51430ee..68089421f5 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -541,15 +541,15 @@ python sstate_hardcode_path () { | |||
541 | staging_host = d.getVar('RECIPE_SYSROOT_NATIVE') | 541 | staging_host = d.getVar('RECIPE_SYSROOT_NATIVE') |
542 | sstate_builddir = d.getVar('SSTATE_BUILDDIR') | 542 | sstate_builddir = d.getVar('SSTATE_BUILDDIR') |
543 | 543 | ||
544 | sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % staging_host | ||
544 | if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross-canadian', d): | 545 | if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross-canadian', d): |
545 | sstate_grep_cmd = "grep -l -e '%s'" % (staging_host) | 546 | sstate_grep_cmd = "grep -l -e '%s'" % (staging_host) |
546 | sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host) | ||
547 | elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d): | 547 | elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d): |
548 | sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host) | 548 | sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host) |
549 | sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIRHOST:g'" % (staging_target, staging_host) | 549 | sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target |
550 | else: | 550 | else: |
551 | sstate_grep_cmd = "grep -l -e '%s'" % (staging_target) | 551 | sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host) |
552 | sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % (staging_target) | 552 | sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target |
553 | 553 | ||
554 | extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES') or '' | 554 | extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES') or '' |
555 | for fixmevar in extra_staging_fixmes.split(): | 555 | for fixmevar in extra_staging_fixmes.split(): |