diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-04 23:42:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-07 11:18:38 +0100 |
commit | c194e5fac6f780bf792d7d560cb0c69f4180752f (patch) | |
tree | 1a14e8a4df2bb5a398e60dd6bf2a644248ef2521 | |
parent | a2db4fa127a3347fc6df31f895fb0b552669119e (diff) | |
download | poky-c194e5fac6f780bf792d7d560cb0c69f4180752f.tar.gz |
wic: Handle new PSEUDO_IGNORE_PATHS variable
Adjust wic to correctly handle the new PSEUDO_IGNORE_PATH variable and avoid
inode corruption issues.
(From OE-Core rev: 13500f5234361385c365c7c35e83f99435500481)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/image_types_wic.bbclass | 2 | ||||
-rw-r--r-- | scripts/lib/wic/partition.py | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass index b2e5fb43e8..286e0f5d54 100644 --- a/meta/classes/image_types_wic.bbclass +++ b/meta/classes/image_types_wic.bbclass | |||
@@ -5,7 +5,7 @@ WICVARS ?= "\ | |||
5 | IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \ | 5 | IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \ |
6 | ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS \ | 6 | ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS \ |
7 | KERNEL_IMAGETYPE MACHINE INITRAMFS_IMAGE INITRAMFS_IMAGE_BUNDLE INITRAMFS_LINK_NAME APPEND \ | 7 | KERNEL_IMAGETYPE MACHINE INITRAMFS_IMAGE INITRAMFS_IMAGE_BUNDLE INITRAMFS_LINK_NAME APPEND \ |
8 | ASSUME_PROVIDED" | 8 | ASSUME_PROVIDED PSEUDO_IGNORE_PATHS" |
9 | 9 | ||
10 | inherit ${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', 'kernel-artifact-names', '', d)} | 10 | inherit ${@bb.utils.contains('INITRAMFS_IMAGE_BUNDLE', '1', 'kernel-artifact-names', '', d)} |
11 | 11 | ||
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 85eb15c8b8..ebe250b00d 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
@@ -199,21 +199,23 @@ class Partition(): | |||
199 | 199 | ||
200 | Currently handles ext2/3/4, btrfs, vfat and squashfs. | 200 | Currently handles ext2/3/4, btrfs, vfat and squashfs. |
201 | """ | 201 | """ |
202 | |||
203 | rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label, | ||
204 | self.lineno, self.fstype) | ||
205 | if os.path.isfile(rootfs): | ||
206 | os.remove(rootfs) | ||
207 | |||
202 | p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) | 208 | p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) |
203 | if (pseudo_dir): | 209 | if (pseudo_dir): |
204 | pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix | 210 | pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix |
205 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir | 211 | pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % pseudo_dir |
206 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir | 212 | pseudo += "export PSEUDO_PASSWD=%s;" % rootfs_dir |
207 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" | 213 | pseudo += "export PSEUDO_NOSYMLINKEXP=1;" |
214 | pseudo += "export PSEUDO_IGNORE_PATHS=%s;" % (rootfs + "," + (get_bitbake_var("PSEUDO_IGNORE_PATHS") or "")) | ||
208 | pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") | 215 | pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") |
209 | else: | 216 | else: |
210 | pseudo = None | 217 | pseudo = None |
211 | 218 | ||
212 | rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label, | ||
213 | self.lineno, self.fstype) | ||
214 | if os.path.isfile(rootfs): | ||
215 | os.remove(rootfs) | ||
216 | |||
217 | if not self.size and real_rootfs: | 219 | if not self.size and real_rootfs: |
218 | # The rootfs size is not set in .ks file so try to get it | 220 | # The rootfs size is not set in .ks file so try to get it |
219 | # from bitbake variable | 221 | # from bitbake variable |