]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: Rename partition images
authorEd Bartosh <ed.bartosh@linux.intel.com>
Sat, 27 Jun 2015 09:23:38 +0000 (12:23 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Jul 2015 22:01:27 +0000 (23:01 +0100)
Renamed partition images into <final image>.p<partition number>
This should make output directory look more organized and easier
to understand.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
scripts/lib/wic/utils/partitionedfs.py

index e093ec577858b6567403b8fba45610dcf03d6e61..d61087a24d34d58f0a79b53507bfd9473b9aef9e 100644 (file)
@@ -18,6 +18,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc., 59
 # Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+import os
 from wic import msger
 from wic.utils.errors import ImageError
 from wic.utils.oe.misc import exec_cmd, exec_native_cmd
@@ -356,6 +357,7 @@ class Image(object):
         for p in self.partitions:
             self.__write_partition(p['num'], p['source_file'],
                                    p['start'], p['size'], image_file)
+            os.rename(p['source_file'], image_file + '.p%d' % p['num'])
 
     def create(self):
         for dev in self.disks.keys():