summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/plugins/source/isoimage-isohybrid.py')
-rw-r--r--scripts/lib/wic/plugins/source/isoimage-isohybrid.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index ca28bc0fa3..fb34235631 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -473,13 +473,12 @@ class IsoImagePlugin(SourcePlugin):
473 utility for booting via BIOS from disk storage devices. 473 utility for booting via BIOS from disk storage devices.
474 """ 474 """
475 475
476 iso_img = "%s.p1" % disk.path
476 full_path = creator._full_path(workdir, disk_name, "direct") 477 full_path = creator._full_path(workdir, disk_name, "direct")
477 iso_img = "%s.p1" % full_path
478 full_path_iso = creator._full_path(workdir, disk_name, "iso") 478 full_path_iso = creator._full_path(workdir, disk_name, "iso")
479 479
480 isohybrid_cmd = "isohybrid -u %s" % iso_img 480 isohybrid_cmd = "isohybrid -u %s" % iso_img
481 msger.debug("running command: %s" % \ 481 msger.debug("running command: %s" % isohybrid_cmd)
482 isohybrid_cmd)
483 exec_native_cmd(isohybrid_cmd, native_sysroot) 482 exec_native_cmd(isohybrid_cmd, native_sysroot)
484 483
485 # Replace the image created by direct plugin with the one created by 484 # Replace the image created by direct plugin with the one created by
@@ -487,9 +486,6 @@ class IsoImagePlugin(SourcePlugin):
487 # mkisofs has a very specific MBR is system area of the ISO image, and 486 # mkisofs has a very specific MBR is system area of the ISO image, and
488 # direct plugin adds and configures an another MBR. 487 # direct plugin adds and configures an another MBR.
489 msger.debug("Replaceing the image created by direct plugin\n") 488 msger.debug("Replaceing the image created by direct plugin\n")
490 os.remove(full_path) 489 os.remove(disk.path)
491 shutil.copy2(iso_img, full_path_iso) 490 shutil.copy2(iso_img, full_path_iso)
492 shutil.copy2(full_path_iso, full_path) 491 shutil.copy2(full_path_iso, full_path)
493
494 # Remove temporary ISO file
495 os.remove(iso_img)