]> code.ossystems Code Review - openembedded-core.git/commit
sstate.bbclass: sstate_hardcode_path(): fix for multilib
authorRobert Yang <liezhi.yang@windriver.com>
Mon, 8 Jan 2018 09:33:00 +0000 (17:33 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Jan 2018 22:14:52 +0000 (22:14 +0000)
commit087510795331fa21ff52f103269087c06b1660fa
tree001c8a3b858d7905a4c0ad4b99624d94c2819e38
parent9d490dc01dcedb216129b22cbe17a6c99efc4f5c
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.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass