diff options
-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 |