diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2020-12-09 18:05:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-20 00:03:04 +0000 |
commit | e12072c7e043a2d3e45b75cb1aaca70c49e94cb4 (patch) | |
tree | d7c9e7dc05c26170e7b33da6007543a90bff152a /scripts | |
parent | fcfda37195ae4eecebcaf8fb74844f7071b4fc7e (diff) | |
download | poky-e12072c7e043a2d3e45b75cb1aaca70c49e94cb4.tar.gz |
wic: Pass canonicalized paths in PSEUDO_IGNORE_PATHS
(From OE-Core rev: 55618cbd58d6784a82e773f323723be6f722232f)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/partition.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index ebe250b00d..286c7867cb 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
@@ -207,11 +207,21 @@ class Partition(): | |||
207 | 207 | ||
208 | p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) | 208 | p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) |
209 | if (pseudo_dir): | 209 | if (pseudo_dir): |
210 | # Canonicalize the ignore paths. This corresponds to | ||
211 | # calling oe.path.canonicalize(), which is used in bitbake.conf. | ||
212 | ignore_paths = [rootfs] + (get_bitbake_var("PSEUDO_IGNORE_PATHS") or "").split(",") | ||
213 | canonical_paths = [] | ||
214 | for path in ignore_paths: | ||
215 | if "$" not in path: | ||
216 | trailing_slash = path.endswith("/") and "/" or "" | ||
217 | canonical_paths.append(os.path.realpath(path) + trailing_slash) | ||
218 | ignore_paths = ",".join(canonical_paths) | ||
219 | |||
210 | pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix | 220 | pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix |
211 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir | 221 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir |
212 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir | 222 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir |
213 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" | 223 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" |
214 | pseudo += "export PSEUDO_IGNORE_PATHS=%s;" % (rootfs + "," + (get_bitbake_var("PSEUDO_IGNORE_PATHS") or "")) | 224 | pseudo += "export PSEUDO_IGNORE_PATHS=%s;" % ignore_paths |
215 | pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") | 225 | pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") |
216 | else: | 226 | else: |
217 | pseudo = None | 227 | pseudo = None |