mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
wic: do not remove build dir in source plugins
Interesting bug was found during implementation of 'include' parser command. Build directory was removed in do_configure_partition method of bootimg- source plugins. This can cause removal of previously prepared partition images if /boot partition is mentioned after other partitions in .ks file. Moved work directory removal to direct.py before processing partitions. (From OE-Core rev: ba98262573cf1600e0d477317f51d488b5f8c4bd) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8d34eea303
commit
3fc6aaa186
@@ -229,6 +229,9 @@ class DirectImageCreator(BaseImageCreator):
|
||||
|
||||
fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
|
||||
|
||||
shutil.rmtree(self.workdir)
|
||||
os.mkdir(self.workdir)
|
||||
|
||||
for part in parts:
|
||||
# get rootfs size from bitbake variable if it's not set in .ks file
|
||||
if not part.size:
|
||||
|
||||
@@ -142,8 +142,6 @@ class BootimgEFIPlugin(SourcePlugin):
|
||||
Called before do_prepare_partition(), creates loader-specific config
|
||||
"""
|
||||
hdddir = "%s/hdd/boot" % cr_workdir
|
||||
rm_cmd = "rm -rf %s" % cr_workdir
|
||||
exec_cmd(rm_cmd)
|
||||
|
||||
install_cmd = "install -d %s/EFI/BOOT" % hdddir
|
||||
exec_cmd(install_cmd)
|
||||
|
||||
@@ -71,9 +71,6 @@ class BootimgPartitionPlugin(SourcePlugin):
|
||||
- copies all files listed in IMAGE_BOOT_FILES variable
|
||||
"""
|
||||
hdddir = "%s/boot" % cr_workdir
|
||||
rm_cmd = "rm -rf %s/boot" % cr_workdir
|
||||
exec_cmd(rm_cmd)
|
||||
|
||||
install_cmd = "install -d %s" % hdddir
|
||||
exec_cmd(install_cmd)
|
||||
|
||||
|
||||
@@ -78,8 +78,6 @@ class BootimgPcbiosPlugin(SourcePlugin):
|
||||
Called before do_prepare_partition(), creates syslinux config
|
||||
"""
|
||||
hdddir = "%s/hdd/boot" % cr_workdir
|
||||
rm_cmd = "rm -rf " + cr_workdir
|
||||
exec_cmd(rm_cmd)
|
||||
|
||||
install_cmd = "install -d %s" % hdddir
|
||||
exec_cmd(install_cmd)
|
||||
|
||||
Reference in New Issue
Block a user