Skip to contentSkip to conversation

wic: fix restoring of original fstab

PATCH Diego Rondini 1 participant 1 message Jun 20, 2017

lore
Share & tools
lore

Diego Rondini

author Tested-by
#0 lore raw

Hi Ed,

Quoted 6 lines

Wic updates fstab if mount points are specified in .wks. After partition images are created the original fstab is restored. However, if exception is raised when partition image being prepared wic doesn't restore original fstab. This can cause duplication of added lines in fstab when 'wic create' runs next time.

Quoted 6 lines

Wrapping call of 'prepare' method and restoring original fstab even if exception occurs should fix this.

[YOCTO #11633]

Signed-off-by Ed Bartosh <ed.bartosh at linux.intel.com>

I've applied the patch locally, and deliberately caused some WicError
exceptions: the resulting fstab correctly has only one mount entry. So this seems to fix #11633.

Thanks for taking care of this,
Diego