diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2017-05-03 23:13:39 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-05-11 16:56:00 +0100 |
commit | 7b56a4327bdef25b99e1376fc30f03a8dba45885 (patch) | |
tree | 405c954cbf69ee09bdf6c553a78269c4ccec171f /meta | |
parent | 439bb8cc711799b45a7f14dc8bcb1d524d993ab2 (diff) | |
download | poky-7b56a4327bdef25b99e1376fc30f03a8dba45885.tar.gz |
useradd.bbclass: Handle COMPONENTS_DIR when restoring state
The export of PSEUDO in useradd_sysroot() contains references to
${COMPONENTS_DIR}. These need to be handled when restoring
postinst-useradd-${PN} from the sstate cache.
(From OE-Core rev: 097875bc9ab9d60a452b01ac6825775983684d68)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/staging.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/useradd.bbclass | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 31cd625640..565638f48d 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
@@ -249,7 +249,7 @@ def staging_processfixme(fixme, target, recipesysroot, recipesysrootnative, d): | |||
249 | if not fixme: | 249 | if not fixme: |
250 | return | 250 | return |
251 | cmd = "sed -e 's:^[^/]*/:%s/:g' %s | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (target, " ".join(fixme), recipesysroot, recipesysrootnative) | 251 | cmd = "sed -e 's:^[^/]*/:%s/:g' %s | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (target, " ".join(fixme), recipesysroot, recipesysrootnative) |
252 | for fixmevar in ['HOSTTOOLS_DIR', 'PKGDATA_DIR']: | 252 | for fixmevar in ['COMPONENTS_DIR', 'HOSTTOOLS_DIR', 'PKGDATA_DIR']: |
253 | fixme_path = d.getVar(fixmevar) | 253 | fixme_path = d.getVar(fixmevar) |
254 | cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path) | 254 | cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path) |
255 | bb.note(cmd) | 255 | bb.note(cmd) |
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index 4373677bd6..92e45ff9bc 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass | |||
@@ -132,6 +132,11 @@ useradd_sysroot () { | |||
132 | useradd_preinst | 132 | useradd_preinst |
133 | } | 133 | } |
134 | 134 | ||
135 | # The export of PSEUDO in useradd_sysroot() above contains references to | ||
136 | # ${COMPONENTS_DIR}. These need to be handled when restoring | ||
137 | # postinst-useradd-${PN} from the sstate cache. | ||
138 | EXTRA_STAGING_FIXMES += "COMPONENTS_DIR" | ||
139 | |||
135 | python useradd_sysroot_sstate () { | 140 | python useradd_sysroot_sstate () { |
136 | task = d.getVar("BB_CURRENTTASK") | 141 | task = d.getVar("BB_CURRENTTASK") |
137 | if task == "package_setscene": | 142 | if task == "package_setscene": |