summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-27 15:08:15 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-02 23:08:37 +0100
commit594dc7213f69eb06c94444ab4d5ef45e465b710a (patch)
tree4a4953b50a6f5b7af1265dde3e50741e6fc7c043 /scripts
parent4023377baef3f1746351bed4bb0399f9bee5b99c (diff)
downloadpoky-594dc7213f69eb06c94444ab4d5ef45e465b710a.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/partition.py6
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):
160 self.prepare_swap_partition(cr_workdir, oe_builddir, 160 self.prepare_swap_partition(cr_workdir, oe_builddir,
161 native_sysroot) 161 native_sysroot)
162 elif self.fstype: 162 elif self.fstype:
163 rootfs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype) 163 rootfs = "%s/fs_%s.%s.%s" % (cr_workdir, self.label,
164 self.lineno, self.fstype)
164 if os.path.isfile(rootfs): 165 if os.path.isfile(rootfs):
165 os.remove(rootfs) 166 os.remove(rootfs)
166 for prefix in ("ext", "btrfs", "vfat", "squashfs"): 167 for prefix in ("ext", "btrfs", "vfat", "squashfs"):
@@ -227,7 +228,8 @@ class Wic_PartData(Mic_PartData):
227 pseudo += "export PSEUDO_NOSYMLINKEXP=%s;" % p_nosymlinkexp 228 pseudo += "export PSEUDO_NOSYMLINKEXP=%s;" % p_nosymlinkexp
228 pseudo += "%s/usr/bin/pseudo " % native_sysroot 229 pseudo += "%s/usr/bin/pseudo " % native_sysroot
229 230
230 rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype) 231 rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label,
232 self.lineno, self.fstype)
231 if os.path.isfile(rootfs): 233 if os.path.isfile(rootfs):
232 os.remove(rootfs) 234 os.remove(rootfs)
233 235