diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-06-27 15:08:15 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-02 23:01:39 +0100 |
commit | e9e860d4dcc73c8e19e0e39180d30c85dc155871 (patch) | |
tree | a28ffa4ad7efdd8e11630a0cee2b5c3a30198f8d | |
parent | bda03019624ab10ae2ebbd85538d32f47f32c9af (diff) | |
download | openembedded-core-e9e860d4dcc73c8e19e0e39180d30c85dc155871.tar.gz openembedded-core-e9e860d4dcc73c8e19e0e39180d30c85dc155871.tar.bz2 openembedded-core-e9e860d4dcc73c8e19e0e39180d30c85dc155871.zip |
wic: Fix naming conflict
Image file name is not unique for the partitions without label.
This causes image being rewritten and used as a source for all
partitions without label. Wic produces broken or incorrect result
images because of that.
Added wks line number to the image name to make it unique.
-rw-r--r-- | scripts/lib/wic/kickstart/custom_commands/partition.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 72f617a1b6..874b20766d 100644 --- a/scripts/lib/wic/kickstart/custom_commands/partition.py +++ b/scripts/lib/wic/kickstart/custom_commands/partition.py @@ -160,7 +160,8 @@ class Wic_PartData(Mic_PartData): self.prepare_swap_partition(cr_workdir, oe_builddir, native_sysroot) elif self.fstype: - rootfs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype) + rootfs = "%s/fs_%s.%s.%s" % (cr_workdir, self.label, + self.lineno, self.fstype) if os.path.isfile(rootfs): os.remove(rootfs) for prefix in ("ext", "btrfs", "vfat", "squashfs"): @@ -227,7 +228,8 @@ class Wic_PartData(Mic_PartData): pseudo += "export PSEUDO_NOSYMLINKEXP=%s;" % p_nosymlinkexp pseudo += "%s/usr/bin/pseudo " % native_sysroot - rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype) + rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label, + self.lineno, self.fstype) if os.path.isfile(rootfs): os.remove(rootfs) |