summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2020-12-09 18:05:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-10 13:40:07 +0000
commit424eeea1bd4cecf009d3ecc2e9d9f3d01e70459c (patch)
tree4701a491e8ae6f6a559aa5f500666e16d9221693
parentc4f8f2ccd9c51ed56bacf4e857a12efc584c6321 (diff)
downloadopenembedded-core-contrib-424eeea1bd4cecf009d3ecc2e9d9f3d01e70459c.tar.gz
wic: Pass canonicalized paths in PSEUDO_IGNORE_PATHS
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/partition.py12
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():
p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
if (pseudo_dir):
+ # Canonicalize the ignore paths. This corresponds to
+ # calling oe.path.canonicalize(), which is used in bitbake.conf.
+ ignore_paths = [rootfs] + (get_bitbake_var("PSEUDO_IGNORE_PATHS") or "").split(",")
+ canonical_paths = []
+ for path in ignore_paths:
+ if "$" not in path:
+ trailing_slash = path.endswith("/") and "/" or ""
+ canonical_paths.append(os.path.realpath(path) + trailing_slash)
+ ignore_paths = ",".join(canonical_paths)
+
pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix
pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir
pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir
pseudo += "export PSEUDO_NOSYMLINKEXP=1;"
- pseudo += "export PSEUDO_IGNORE_PATHS=%s;" % (rootfs + "," + (get_bitbake_var("PSEUDO_IGNORE_PATHS") or ""))
+ pseudo += "export PSEUDO_IGNORE_PATHS=%s;" % ignore_paths
pseudo += "%s " % get_bitbake_var("FAKEROOTCMD")
else:
pseudo = None