summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2020-04-19 08:35:33 +0200
committerSteve Sakoman <steve@sakoman.com>2021-01-28 04:41:47 -1000
commitb4393f56069801c014e736100dcdeab77e549f08 (patch)
treed6b27355ae0e09330983a19bbddd915925424378
parent63bebeaf60757967b47cae1e24aa61ec5bcbd61b (diff)
downloadopenembedded-core-contrib-b4393f56069801c014e736100dcdeab77e549f08.tar.gz
wic: Avoid creating invalid pseudo directory
If the source of the rootfs is not a bitbake cooked image, or it is not pointing to the root of one, we call pseudo again, which will produce a new pseudo folder at rootfs/../pseudo Eg: part /etc --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --fstype=ext4 Cc: Paul Barker <pbarker@konsulko.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 799a24ae78655f7a3eda7456b1a0ffaf3e43ec16) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--scripts/lib/wic/partition.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 18ecec2de9..1347571aa0 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -199,13 +199,14 @@ class Partition():
Currently handles ext2/3/4, btrfs, vfat and squashfs.
"""
p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
- if (pseudo_dir == None):
- pseudo_dir = "%s/../pseudo" % rootfs_dir
- 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 += "%s " % get_bitbake_var("FAKEROOTCMD")
+ if (pseudo_dir):
+ 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 += "%s " % get_bitbake_var("FAKEROOTCMD")
+ else:
+ pseudo = None
rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label,
self.lineno, self.fstype)