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