wic: Rename partition images

Renamed partition images into <final image>.p<partition number>
This should make output directory look more organized and easier
to understand.

(From OE-Core rev: c826939e4eeed034f39207089ec1a7ed87c1c493)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh 2015-06-27 12:23:38 +03:00 committed by Richard Purdie
parent e9237bf0fa
commit 1e307c3b40
1 changed files with 2 additions and 0 deletions

View 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():