diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2020-12-09 18:05:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-03 14:13:53 +0000 |
commit | 951aa2a0888902938b1735a6d2221c44118c4ea9 (patch) | |
tree | fa466d217427ec680bb63deda6b8b9160a1232c8 | |
parent | 43a6f73d67c94c1ec3fc509f1620f2e0d2e54d5d (diff) | |
download | poky-951aa2a0888902938b1735a6d2221c44118c4ea9.tar.gz |
wic: Pass canonicalized paths in PSEUDO_IGNORE_PATHS
(From OE-Core rev: 4117e497650a0d8e7709439385c926d58a7d9aca)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 55618cbd58d6784a82e773f323723be6f722232f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 4ec0608fe4..cc0382ce54 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
@@ -206,11 +206,21 @@ class Partition(): | |||
206 | 206 | ||
207 | p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) | 207 | p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) |
208 | if (pseudo_dir): | 208 | if (pseudo_dir): |
209 | # Canonicalize the ignore paths. This corresponds to | ||
210 | # calling oe.path.canonicalize(), which is used in bitbake.conf. | ||
211 | ignore_paths = [rootfs] + (get_bitbake_var("PSEUDO_IGNORE_PATHS") or "").split(",") | ||
212 | canonical_paths = [] | ||
213 | for path in ignore_paths: | ||
214 | if "$" not in path: | ||
215 | trailing_slash = path.endswith("/") and "/" or "" | ||
216 | canonical_paths.append(os.path.realpath(path) + trailing_slash) | ||
217 | ignore_paths = ",".join(canonical_paths) | ||
218 | |||
209 | pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix | 219 | pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix |
210 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir | 220 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir |
211 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir | 221 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir |
212 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" | 222 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" |
213 | pseudo += "export PSEUDO_IGNORE_PATHS=%s;" % (rootfs + "," + (get_bitbake_var("PSEUDO_IGNORE_PATHS") or "")) | 223 | pseudo += "export PSEUDO_IGNORE_PATHS=%s;" % ignore_paths |
214 | pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") | 224 | pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") |
215 | else: | 225 | else: |
216 | pseudo = None | 226 | pseudo = None |