diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2020-04-19 08:35:33 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-03 14:13:53 +0000 |
commit | a8d85a74bd438d88781e70d32da58d2476de2e41 (patch) | |
tree | cbbfb5b70cd5524563f6199b27435e0a3debeb0a /scripts/lib | |
parent | 30fff836b92086258d7172614b7d5a312d1fa62e (diff) | |
download | poky-a8d85a74bd438d88781e70d32da58d2476de2e41.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: b4393f56069801c014e736100dcdeab77e549f08)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/wic/partition.py | 15 |
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(): | |||
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) |