summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2020-04-19 08:35:33 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-26 14:00:50 +0100
commitc81d5c6243d33036ad6048a49b0a1c3cfce3e9ba (patch)
tree3124b9658baf176e9e8c951af10ad86a01e8a5eb /scripts/lib/wic
parent19e778fe1b021a84d14af97141cb8373d89dd44c (diff)
downloadpoky-c81d5c6243d33036ad6048a49b0a1c3cfce3e9ba.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> (From OE-Core rev: 799a24ae78655f7a3eda7456b1a0ffaf3e43ec16) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic')
-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 3240be072a..7d9dd616a6 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -199,13 +199,14 @@ class Partition():
199 Currently handles ext2/3/4, btrfs, vfat and squashfs. 199 Currently handles ext2/3/4, btrfs, vfat and squashfs.
200 """ 200 """
201 p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) 201 p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
202 if (pseudo_dir == None): 202 if (pseudo_dir):
203 pseudo_dir = "%s/../pseudo" % rootfs_dir 203 pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix
204 pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix 204 pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir
205 pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir 205 pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir
206 pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir 206 pseudo += "export PSEUDO_NOSYMLINKEXP=1;"
207 pseudo += "export PSEUDO_NOSYMLINKEXP=1;" 207 pseudo += "%s " % get_bitbake_var("FAKEROOTCMD")
208 pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") 208 else:
209 pseudo = None
209 210
210 rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label, 211 rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label,
211 self.lineno, self.fstype) 212 self.lineno, self.fstype)