[gnome-ostree] builddisks: Only install bootloader for new disk images



commit 564f3cfb7a8fb451fbbe9d7094be9a58d7bc0f6f
Author: Colin Walters <walters verbum org>
Date:   Wed Jul 10 08:48:22 2013 -0400

    builddisks: Only install bootloader for new disk images
    
    Assume the previous installation of syslinux succeeded.

 src/js/tasks/task-builddisks.js |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/js/tasks/task-builddisks.js b/src/js/tasks/task-builddisks.js
index be8f5c7..c7c87c8 100644
--- a/src/js/tasks/task-builddisks.js
+++ b/src/js/tasks/task-builddisks.js
@@ -101,7 +101,8 @@ const TaskBuildDisks = new Lang.Class({
             let diskPath = workImageDir.get_child(diskName);
             let prevPath = currentImageLink.get_child(diskName);
             GSystem.shutil_rm_rf(diskPath, cancellable);
-            if (this._inheritPreviousDisk && prevPath.query_exists(null)) {
+            let doCloneDisk = this._inheritPreviousDisk && prevPath.query_exists(null);
+            if (doCloneDisk) {
                 LibQA.copyDisk(prevPath, diskPath, cancellable);
             } else {
                 LibQA.createDisk(diskPath, cancellable);
@@ -117,8 +118,11 @@ const TaskBuildDisks = new Lang.Class({
             } finally {
                 gfmnt.umount(cancellable);
             }
-            LibQA.bootloaderInstall(diskPath, subworkdir, osname, cancellable);
-            print("Bootloader installation complete");
+            // Assume previous disks have successfully installed a bootloader
+            if (!doCloneDisk) {
+                LibQA.bootloaderInstall(diskPath, subworkdir, osname, cancellable);
+                print("Bootloader installation complete");
+            }
 
             this._postDiskCreation(diskPath, cancellable);
             print("post-disk creation complete");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]