poky/scripts/lib/wic/plugins/source
Paul Barker f85a4a1462 wic: Update pseudo db when excluding content from rootfs
To exclude content from the rootfs, wic makes a copy (using hardlinks if
possible) of the rootfs directory and associated pseudo db, then removes
files & directories as needed. However if these files and directories
are removed using the python functions os.remove and shutil.rmtree, the
copied pseudo db will not be updated correctly. For files copied from
the original rootfs, if hardlinks were used successfully when copying
the rootfs this should mean that the relevant inodes can't be reused and
so the risk of pseudo aborts should be avoided. However, this logic
doesn't apply for directories (as they can't be hardlinked) or for files
added via the '--include-path' argument (as they weren't present in the
original rootfs) and so there remains some risk of inodes being reused
and the pseudo db becoming corrupted.

To fix this, use the 'rm' command under pseudo when removing files &
directories from the copied rootfs to ensure that the copied pseudo db
is updated.

(From OE-Core rev: d5db7e268947f0392c2126137571a44acd29ccd6)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20 22:46:18 +00:00
..
bootimg-biosplusefi.py wic/plugins: Source that support both EFI and BIOS 2019-07-23 22:26:28 +01:00
bootimg-efi.py wic/bootimg-efi: IMAGE_EFI_BOOT_FILES variable added to separate bootimg-efi and bootimg-partition 2020-09-15 11:53:28 +01:00
bootimg-partition.py wic: fix typo 2020-08-06 15:12:39 +01:00
bootimg-pcbios.py wic: add support for kernel with initramfs bundled 2019-07-17 19:25:02 +01:00
empty.py wic: Introduce empty plugin to create unformatted empty partitions 2020-12-15 22:51:56 +00:00
isoimage-isohybrid.py isoimage-isohybrid.py: Support adding files/dirs 2020-11-08 14:03:20 +00:00
rawcopy.py wic: fix images build in parallel 2020-01-19 13:24:39 +00:00
rootfs.py wic: Update pseudo db when excluding content from rootfs 2021-01-20 22:46:18 +00:00