summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2020-12-09 18:05:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-12 14:25:14 +0000
commit44bc055c8cdc9b00dfe757e175c81f7723aebb20 (patch)
treec58e25440d5df915f65e00d749e29e1a1aea62af /scripts
parent6df2d6ed74eb6e8997fc4b861ad7fbaf4aa3c12b (diff)
downloadpoky-44bc055c8cdc9b00dfe757e175c81f7723aebb20.tar.gz
wic: Pass canonicalized paths in PSEUDO_IGNORE_PATHS
(From OE-Core rev: 9aec2fdda1235f069cbb365634a3f0fcfc846682) 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: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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():
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