goldfish: clean up stale qcow2 file
when create a new combined image
Handy in the build environment to avoid
stale qcow2 file that could fail the boot
Change-Id: I962eb3041da25ac0129246536a9bac2d7dd96af2
diff --git a/tools/mk_combined_img.py b/tools/mk_combined_img.py
index 1b7bbff..1f195ac 100755
--- a/tools/mk_combined_img.py
+++ b/tools/mk_combined_img.py
@@ -113,6 +113,10 @@
output_filename = os.path.expandvars(args.output)
+ # remove the output_filename.qcow2
+ print "removing " + output_filename + ".qcow2"
+ shell_command(['rm', '-rf', output_filename + ".qcow2"])
+
# check input file
config_filename = args.input
if not os.path.exists(config_filename):