[gnome-ostree/wip/bootloader] [wip/bootloader] Update to match DeploymentModel2



commit 8c15378dd9b06d27ec918b7da6af6f57accf8032
Author: Colin Walters <walters verbum org>
Date:   Thu Jun 6 15:42:21 2013 -0400

    [wip/bootloader] Update to match DeploymentModel2
    
    https://live.gnome.org/OSTree/DeploymentModel2

 src/js/fileutil.js              |   26 +++++-
 src/js/libqa.js                 |   84 +++++++------------
 src/js/tasks/task-build.js      |  180 ++++++++++++++++++++++++++++----------
 src/js/tasks/task-builddisks.js |    1 -
 4 files changed, 184 insertions(+), 107 deletions(-)
---
diff --git a/src/js/fileutil.js b/src/js/fileutil.js
index 81510bd..87191bf 100644
--- a/src/js/fileutil.js
+++ b/src/js/fileutil.js
@@ -20,7 +20,7 @@ const Gio = imports.gi.Gio;
 
 const Params = imports.params;
 
-function walkDirInternal(dir, matchParams, callback, cancellable, queryStr, depth) {
+function walkDirInternal(dir, matchParams, callback, cancellable, queryStr, depth, sortByName) {
     let denum = dir.enumerate_children(queryStr, Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS,
                                       cancellable);
     let info;
@@ -30,6 +30,7 @@ function walkDirInternal(dir, matchParams, callback, cancellable, queryStr, dept
        depth -= 1;
     }
 
+    let sortedFiles = [];
     while ((info = denum.next_file(cancellable)) != null) {
        let name = info.get_name();
        let child = dir.get_child(name);
@@ -48,11 +49,27 @@ function walkDirInternal(dir, matchParams, callback, cancellable, queryStr, dept
            continue;
        if (matchParams.contentType != null && matchParams.contentType != info.get_content_type())
            continue;
-       callback(child, cancellable);
+       if (!sortByName)
+           callback(child, cancellable);
+       else
+           sortedFiles.push(child);
+    }
+    if (sortByName) {
+       sortedFiles.sort(function (a, b) {
+           return a.get_basename().localeCompare(b.get_basename());
+       });
+       for (let i = 0; i < sortedFiles.length; i++) {
+           callback(sortedFiles[i], cancellable);
+       }
     }
 
     denum.close(cancellable);
 
+    if (sortByName) {
+       subdirs.sort(function (a, b) {
+           return a.get_basename().localeCompare(b.get_basename());
+       });
+    }
     for (let i = 0; i < subdirs.length; i++) {
        walkDirInternal(subdirs[i], matchParams, callback, cancellable, queryStr, depth);
     }
@@ -62,10 +79,11 @@ function walkDir(dir, matchParams, callback, cancellable) {
     matchParams = Params.parse(matchParams, { nameRegex: null,
                                              fileType: null,
                                              contentType: null,
-                                             depth: -1 });
+                                             depth: -1,
+                                             sortByName: false });
     let queryStr = 'standard::name,standard::type,unix::mode';
     if (matchParams.contentType)
        queryStr += ',standard::fast-content-type';
     let depth = matchParams.depth;
-    walkDirInternal(dir, matchParams, callback, cancellable, queryStr, depth);
+    walkDirInternal(dir, matchParams, callback, cancellable, queryStr, depth, matchParams.sortByName);
 }
diff --git a/src/js/libqa.js b/src/js/libqa.js
index 9a1b443..28cde8f 100644
--- a/src/js/libqa.js
+++ b/src/js/libqa.js
@@ -265,10 +265,9 @@ function _getInitramfsPath(mntdir, kernelRelease) {
 
 function pullDeploy(mntdir, srcrepo, osname, target, revision, cancellable) {
     let ostreedir = mntdir.get_child('ostree');
-    let ostree_osdir = ostreedir.resolve_relative_path('deploy/' + osname);
+    let ostreeOsdir = ostreedir.resolve_relative_path('deploy/' + osname);
 
-    let adminCmd = ['ostree', 'admin', '--ostree-dir=' + ostreedir.get_path(),
-                    '--boot-dir=' + mntdir.get_child('boot').get_path()];
+    let adminCmd = ['ostree', 'admin', '--sysroot=' + mntdir.get_path()];
     let adminEnv = GLib.get_environ();
     adminEnv.push('LIBGSYSTEM_ENABLE_GUESTFS_FUSE_WORKAROUND=1');
     let procdir = mntdir.get_child('proc');
@@ -277,74 +276,51 @@ function pullDeploy(mntdir, srcrepo, osname, target, revision, cancellable) {
                          {logInitiation: true, env: adminEnv});
     }
 
-    // *** NOTE ***
-    // Here we blow away any current deployment.  This is pretty lame, but it
-    // avoids us triggering a variety of guestfs/FUSE bugs =(
-    // See: https://bugzilla.redhat.com/show_bug.cgi?id=892834
-    //
-    // But regardless, it's probably useful if every
-    // deployment starts clean, and callers can use libguestfs
-    // to crack the FS open afterwards and modify config files
-    // or the like.
-    GSystem.shutil_rm_rf(ostree_osdir, cancellable);
-
     let revOrTarget;
     if (revision)
        revOrTarget = revision;
     else
        revOrTarget = target;
+
+    // Remove any existing bootloader configuration, and stub out an
+    // empty syslinux configuration that we can use to bootstrap.
+    let bootLoaderLink = mntdir.resolve_relative_path('boot/loader');
+    GSystem.shutil_rm_rf(bootLoaderLink, cancellable);
+    let bootLoaderDir0 = mntdir.resolve_relative_path('boot/loader.0');
+    GSystem.shutil_rm_rf(bootLoaderDir0, cancellable);
+    bootLoaderLink.make_symbolic_link('loader.0', cancellable);
+    GSystem.file_ensure_directory(bootLoaderDir0, true, cancellable);
+    let syslinuxPath = mntdir.resolve_relative_path('boot/loader/syslinux.cfg');
+    syslinuxPath.replace_contents('', null, false, Gio.FileCreateFlags.NONE, cancellable);
+    
+    // A compatibility symlink for syslinux
+    let syslinuxDir = mntdir.resolve_relative_path('boot/syslinux');
+    GSystem.shutil_rm_rf(syslinuxDir, cancellable);
+    GSystem.file_ensure_directory(syslinuxDir, true, cancellable);
+    let syslinuxLink = mntdir.resolve_relative_path('boot/syslinux/syslinux.cfg');
+    syslinuxLink.make_symbolic_link('../loader/syslinux.cfg', cancellable);
+
+    // Also blow alway all existing deployments here for the OS; this
+    // will clean up disks that were using the old ostree model.
+    GSystem.shutil_rm_rf(ostreeOsdir, cancellable);
     
     ProcUtil.runSync(adminCmd.concat(['os-init', osname]), cancellable,
                      {logInitiation: true, env: adminEnv});
     ProcUtil.runSync(['ostree', '--repo=' + ostreedir.get_child('repo').get_path(),
                       'pull-local', srcrepo.get_path(), revOrTarget], cancellable,
                      {logInitiation: true, env: adminEnv});
-    
-    ProcUtil.runSync(adminCmd.concat(['deploy', '--no-kernel', osname, target, revOrTarget]), cancellable,
-                     {logInitiation: true, env: adminEnv});
-    ProcUtil.runSync(adminCmd.concat(['update-kernel', '--no-bootloader', osname]), cancellable,
-                     {logInitiation: true, env: adminEnv});
-    ProcUtil.runSync(adminCmd.concat(['prune', osname]), cancellable,
-                     {logInitiation: true, env: adminEnv});
-};
 
-function configureBootloader(mntdir, osname, cancellable) {
-    let bootdir = mntdir.get_child('boot');
-    let ostreedir = mntdir.get_child('ostree');
+    let rootArg = 'root=LABEL=gnostree-root';
+    ProcUtil.runSync(adminCmd.concat(['deploy', '--karg=' + rootArg, '--karg=quiet', '--karg=splash',
+                                     osname, revOrTarget]), cancellable,
+                     {logInitiation: true, env: adminEnv});
 
     let defaultFstab = 'LABEL=gnostree-root / ext4 defaults 1 1\n\
 LABEL=gnostree-boot /boot ext4 defaults 1 2\n\
 LABEL=gnostree-swap swap swap defaults 0 0\n';
-    let fstabPath = ostreedir.resolve_relative_path('deploy/' + osname + '/current-etc/fstab');
+    let fstabPath = ostreeOsdir.resolve_relative_path('current/etc/fstab');
     fstabPath.replace_contents(defaultFstab, null, false, Gio.FileCreateFlags.REPLACE_DESTINATION, 
cancellable);
-
-    let deployKernelPath = this._findCurrentKernel(mntdir, osname, cancellable);
-    let bootKernelPath = bootdir.resolve_relative_path('ostree/' + deployKernelPath.get_basename());
-    if (!bootKernelPath.query_exists(cancellable))
-        throw new Error("" + bootKernelPath.get_path() + " doesn't exist");
-    let kernelRelease = this._parseKernelRelease(deployKernelPath);
-    let initramfsPath = this._getInitramfsPath(mntdir, kernelRelease);
-
-    let bootRelativeKernelPath = bootdir.get_relative_path(bootKernelPath);
-    if (bootRelativeKernelPath == null)
-        throw new Error("" + bootKernelPath.get_path() + " is not relative to " + bootdir.get_path());
-    let bootRelativeInitramfsPath = bootdir.get_relative_path(initramfsPath);
-
-    // Syslinux conf
-    let syslinuxDir = mntdir.resolve_relative_path('boot/syslinux');
-    GSystem.file_ensure_directory(syslinuxDir, false, cancellable);
-    let syslinuxConfPath = syslinuxDir.get_child('syslinux.cfg');
-    let syslinuxConf = Format.vprintf('PROMPT 1\n\
-TIMEOUT 50\n\
-DEFAULT %s\n\
-\n\
-LABEL %s\n\
-\tLINUX /%s\n\
-\tAPPEND root=LABEL=gnostree-root rw quiet splash ostree=%s/current\n\
-\tINITRD /%s\n', [osname, osname, bootRelativeKernelPath, osname, bootRelativeInitramfsPath]);
-    print('Saving syslinuxconf at ' + syslinuxConfPath.get_path());
-    syslinuxConfPath.replace_contents(syslinuxConf, null, false, Gio.FileCreateFlags.REPLACE_DESTINATION, 
cancellable);
-}
+};
 
 function bootloaderInstall(diskpath, workdir, osname, cancellable) {
     let qemuArgs = getDefaultQemuOptions();
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index 34e8d6c..e850185 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -799,14 +799,27 @@ const TaskBuild = new Lang.Class({
                                               return;
                                           } else {
                                               let composeRootdir = result;
-                                              let shareOstree = 
composeRootdir.resolve_relative_path('usr/share/ostree');
-                                              GSystem.file_ensure_directory(shareOstree, true, cancellable);
-                                              let triggersRunPath = shareOstree.get_child('triggers-run');
-                                              
triggersRunPath.create(Gio.FileCreateFlags.REPLACE_DESTINATION, cancellable).close(cancellable);
+                                              
+                                              this._postComposeTransform(composeRootdir, cancellable);
                                               callback([composeRootdir, relatedTmpPath], null);
                                           }
                                       }));
     },
+
+    _postComposeTransform: function(composeRootdir, cancellable) {
+       // Create /usr/share/ostree/triggers-run; this is a temporary
+       // hack until the trigger functionality moves outside of ostree
+       // entirely.
+       let shareOstree = composeRootdir.resolve_relative_path('usr/share/ostree');
+       GSystem.file_ensure_directory(shareOstree, true, cancellable);
+       let triggersRunPath = shareOstree.get_child('triggers-run');
+       triggersRunPath.create(Gio.FileCreateFlags.REPLACE_DESTINATION, cancellable).close(cancellable);
+       
+       // Move /etc to /usr/etc, since it contains defaults.
+       let etc = composeRootdir.resolve_relative_path("etc");
+       let usrEtc = composeRootdir.resolve_relative_path("usr/etc");
+       GSystem.file_rename(etc, usrEtc, cancellable);
+    },
     
     _commitComposedTreeAsync: function(targetName, composeRootdir, relatedTmpPath, cancellable, callback) {
         let treename = this.osname + '/' + targetName;
@@ -856,7 +869,33 @@ const TaskBuild = new Lang.Class({
                                           })));
     },
 
-    _generateInitramfs: function(architecture, composeRootdir, initramfsDepends, cancellable) {
+    // Return a SHA256 checksum of the contents of the kernel and all
+    // modules; this is unlike an OSTree checksum in that we're just
+    // checksumming the contents, not the uid/gid/xattrs.
+    // Unfortunately, we can't rely on those for /boot anyways.
+    _getKernelChecksum: function(kernelPath, kernelRelease, composeRootdir, cancellable) {
+       let checksum = GLib.Checksum.new(GLib.ChecksumType.SHA256);
+       let contents = GSystem.file_map_readonly(kernelPath, cancellable);
+       checksum.update(contents.toArray());
+       contents = null;
+       let modulesPath = composeRootdir.resolve_relative_path('lib/modules/' + kernelRelease);
+       if (modulesPath.query_exists(null)) {
+           // Only checksum .ko files; we don't want to pick up the
+           // modules.order file and such that might contain
+           // timestamps.
+           FileUtil.walkDir(modulesPath, { fileType: Gio.FileType.REGULAR,
+                                           nameRegex: /\.ko$/,
+                                           sortByName: true },
+                            function (child, cancellable) {
+                                let contents = GSystem.file_map_readonly(child, cancellable);
+                                checksum.update(contents.toArray());
+                                contents = null;
+                            }, cancellable);
+       }
+       return checksum.get_string();
+    },
+
+    _prepareKernelAndInitramfs: function(architecture, composeRootdir, initramfsDepends, cancellable) {
        let e = composeRootdir.get_child('boot').enumerate_children('standard::*', 
Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, cancellable);
        let info;
        let kernelPath = null;
@@ -875,6 +914,8 @@ const TaskBuild = new Lang.Class({
        let releaseIdx = kernelName.indexOf('-');
        let kernelRelease = kernelName.substr(releaseIdx + 1);
 
+       let kernelContentsChecksum = this._getKernelChecksum(kernelPath, kernelRelease, composeRootdir, 
cancellable);
+
         let initramfsCachedir = this.cachedir.resolve_relative_path('initramfs/' + architecture);
        GSystem.file_ensure_directory(initramfsCachedir, true, cancellable);
 
@@ -883,51 +924,98 @@ const TaskBuild = new Lang.Class({
        if (initramfsEpoch)
            initramfsEpochVersion = initramfsEpoch['version'];
        let fullInitramfsDependsString = 'epoch:' + initramfsEpochVersion +
-           ';kernel:' + kernelRelease + ';' +
+           ';kernel:' + kernelContentsChecksum + ';' +
            initramfsDepends.join(';'); 
        let dependsChecksum = GLib.compute_checksum_for_bytes(GLib.ChecksumType.SHA256,
                                                              GLib.Bytes.new(fullInitramfsDependsString));
 
-       let cachedInitramfsPath = initramfsCachedir.get_child(dependsChecksum);
-       if (cachedInitramfsPath.query_exists(null)) {
-           print("Reusing cached initramfs " + cachedInitramfsPath.get_path());
-           return [kernelRelease, cachedInitramfsPath];
+       let cachedInitramfsDirPath = initramfsCachedir.get_child(dependsChecksum);
+       if (cachedInitramfsDirPath.query_file_type(Gio.FileQueryInfoFlags.NONE, null) == 
Gio.FileType.DIRECTORY) {
+           print("Reusing cached initramfs " + cachedInitramfsDirPath.get_path());
        } else {
            print("No cached initramfs matching " + fullInitramfsDependsString);
-       }
 
-       // Clean out all old initramfs images
-       GSystem.shutil_rm_rf(initramfsCachedir, cancellable);
-       GSystem.file_ensure_directory(initramfsCachedir, true, cancellable);
+           // Clean out all old initramfs images
+           GSystem.shutil_rm_rf(initramfsCachedir, cancellable);
+
+           let cwd = Gio.File.new_for_path('.');
+           let workdir = cwd.get_child('tmp-initramfs-' + architecture);
+           let varTmp = workdir.resolve_relative_path('var/tmp');
+           GSystem.file_ensure_directory(varTmp, true, cancellable);
+           let varDir = varTmp.get_parent();
+           let tmpDir = workdir.resolve_relative_path('tmp');
+           GSystem.file_ensure_directory(tmpDir, true, cancellable);
+           let initramfsTmp = tmpDir.get_child('initramfs-ostree.img');
+           let args = ['linux-user-chroot', '--mount-readonly', '/',
+                       '--mount-proc', '/proc',
+                       '--mount-bind', '/dev', '/dev',
+                       '--mount-bind', varDir.get_path(), '/var',
+                       '--mount-bind', tmpDir.get_path(), '/tmp',
+                       composeRootdir.get_path(),
+                       'dracut', '--tmpdir=/tmp', '-f', '/tmp/initramfs-ostree.img',
+                       kernelRelease];
+           
+           print("Running: " + args.map(GLib.shell_quote).join(' '));
+           let context = new GSystem.SubprocessContext({ argv: args });
+           let proc = new GSystem.Subprocess({ context: context });
+           proc.init(cancellable);
+           proc.wait_sync_check(cancellable);
 
-       let cwd = Gio.File.new_for_path('.');
-       let workdir = cwd.get_child('tmp-initramfs-' + architecture);
-       let varTmp = workdir.resolve_relative_path('var/tmp');
-       GSystem.file_ensure_directory(varTmp, true, cancellable);
-       let varDir = varTmp.get_parent();
-       let tmpDir = workdir.resolve_relative_path('tmp');
-       GSystem.file_ensure_directory(tmpDir, true, cancellable);
-       let initramfsTmp = tmpDir.get_child('initramfs-ostree.img');
-       let args = ['linux-user-chroot', '--mount-readonly', '/',
-                   '--mount-proc', '/proc',
-                   '--mount-bind', '/dev', '/dev',
-                   '--mount-bind', varDir.get_path(), '/var',
-                   '--mount-bind', tmpDir.get_path(), '/tmp',
-                   composeRootdir.get_path(),
-                   'dracut', '--tmpdir=/tmp', '-f', '/tmp/initramfs-ostree.img',
-                   kernelRelease];
-                   
-       print("Running: " + args.map(GLib.shell_quote).join(' '));
-       let context = new GSystem.SubprocessContext({ argv: args });
-       let proc = new GSystem.Subprocess({ context: context });
-       proc.init(cancellable);
-       proc.wait_sync_check(cancellable);
+           GSystem.file_chmod(initramfsTmp, 420, cancellable);
+
+           let contents = GSystem.file_map_readonly(initramfsTmp, cancellable);
+           let initramfsContentsChecksum = GLib.compute_checksum_for_bytes(GLib.ChecksumType.SHA256, 
contents);
+           contents = null;
 
-       GSystem.file_chmod(initramfsTmp, 420, cancellable);
+           let tmpCachedInitramfsDirPath = 
cachedInitramfsDirPath.get_parent().get_child(cachedInitramfsDirPath.get_basename() + '.tmp');
+           GSystem.shutil_rm_rf(tmpCachedInitramfsDirPath, cancellable);
+           GSystem.file_ensure_directory(tmpCachedInitramfsDirPath, true, cancellable);
 
-       GSystem.file_rename(initramfsTmp, cachedInitramfsPath, cancellable);
+           GSystem.file_rename(initramfsTmp, tmpCachedInitramfsDirPath.get_child('initramfs-' + 
kernelRelease + '-' + initramfsContentsChecksum), cancellable);
+           GSystem.file_linkcopy(kernelPath, tmpCachedInitramfsDirPath.get_child('vmlinuz-' + kernelRelease 
+ '-' + kernelContentsChecksum),
+                                 Gio.FileCopyFlags.OVERWRITE, cancellable);
+           
+           GSystem.shutil_rm_rf(cachedInitramfsDirPath, cancellable);
+           GSystem.file_rename(tmpCachedInitramfsDirPath, cachedInitramfsDirPath, cancellable);
+       }
+
+       let cachedKernelPath = null;
+       let cachedInitramfsPath = null;
+       FileUtil.walkDir(cachedInitramfsDirPath, { fileType: Gio.FileType.REGULAR },
+                        function (child, cancellable) {
+                            if (child.get_basename().indexOf('initramfs-') == 0)
+                                cachedInitramfsPath = child;
+                            else if (child.get_basename().indexOf('vmlinuz-') == 0)
+                                cachedKernelPath = child;
+                        }, cancellable);
+       if (cachedKernelPath == null || cachedInitramfsPath == null)
+           throw new Error("Missing file in " + cachedInitramfsDirPath);
+       let cachedInitramfsPathName = cachedInitramfsPath.get_basename();
+       let initramfsContentsChecksum = 
cachedInitramfsPathName.substr(cachedInitramfsPathName.lastIndexOf('-') + 1);
+
+       let ostreeBootChecksum = GLib.compute_checksum_for_string(GLib.ChecksumType.SHA256,
+                                                                 kernelContentsChecksum + 
initramfsContentsChecksum,
+                                                                 -1);
+       
+       return { kernelRelease: kernelRelease,
+                kernelPath: cachedKernelPath,
+                kernelChecksum: kernelContentsChecksum,
+                initramfsPath: cachedInitramfsPath,
+                initramfsContentsChecksum: initramfsContentsChecksum,
+                ostreeBootChecksum: ostreeBootChecksum };
+    },
 
-       return [kernelRelease, cachedInitramfsPath];
+    // Clear out the target's /boot directory, and replace it with
+    // kernel/initramfs that are named with the same
+    // ostreeBootChecksum, derived from individual checksums
+    _installKernelAndInitramfs: function(kernelInitramfsData, composeRootdir, cancellable) {
+       let bootDir = composeRootdir.get_child('boot');
+       GSystem.shutil_rm_rf(bootDir, cancellable);
+       GSystem.file_ensure_directory(bootDir, true, cancellable);
+       let targetKernelPath = bootDir.get_child('vmlinuz-' + kernelInitramfsData.kernelRelease + '-' + 
kernelInitramfsData.ostreeBootChecksum);
+       GSystem.file_linkcopy(kernelInitramfsData.kernelPath, targetKernelPath, 
Gio.FileCopyFlags.ALL_METADATA, cancellable);
+       let targetInitramfsPath = bootDir.get_child('initramfs-' + kernelInitramfsData.kernelRelease + '-' + 
kernelInitramfsData.ostreeBootChecksum);
+       GSystem.file_linkcopy(kernelInitramfsData.initramfsPath, targetInitramfsPath, 
Gio.FileCopyFlags.ALL_METADATA, cancellable);
     },
 
     /* Build the Yocto base system. */
@@ -1274,11 +1362,9 @@ const TaskBuild = new Lang.Class({
                                               return;
                                           }
                                           let [composeRootdir, relatedTmpPath] = result;
-                                          let [kernelRelease, initramfsPath] = 
this._generateInitramfs(architecture, composeRootdir, initramfsDepends, cancellable);
-                                          archInitramfsImages[architecture] = [kernelRelease, initramfsPath];
-                                          let initramfsTargetName = 'initramfs-' + kernelRelease + '.img';
-                                          let targetInitramfsPath = 
composeRootdir.resolve_relative_path('boot').get_child(initramfsTargetName);
-                                          GSystem.file_linkcopy(initramfsPath, targetInitramfsPath, 
Gio.FileCopyFlags.ALL_METADATA, cancellable);
+                                          let kernelInitramfsData = 
this._prepareKernelAndInitramfs(architecture, composeRootdir, initramfsDepends, cancellable);
+                                          archInitramfsImages[architecture] = kernelInitramfsData;
+                                          this._installKernelAndInitramfs(kernelInitramfsData, 
composeRootdir, cancellable);
                                           this._commitComposedTreeAsync(develTargetName, composeRootdir, 
relatedTmpPath, cancellable,
                                                                         Lang.bind(this, function(result, 
err) {
                                                                             if (err) {
@@ -1324,10 +1410,8 @@ const TaskBuild = new Lang.Class({
                                               }
                                               composeTreeTaskCount--;
                                               let [composeRootdir, relatedTmpPath] = result;
-                                              let [kernelRelease, initramfsPath] = 
archInitramfsImages[architecture];
-                                              let initramfsTargetName = 'initramfs-' + kernelRelease + 
'.img';
-                                              let targetInitramfsPath = 
composeRootdir.resolve_relative_path('boot').get_child(initramfsTargetName);
-                                              GSystem.file_linkcopy(initramfsPath, targetInitramfsPath, 
Gio.FileCopyFlags.ALL_METADATA, cancellable);
+                                              let kernelInitramfsData = archInitramfsImages[architecture];
+                                              this._installKernelAndInitramfs(kernelInitramfsData, 
composeRootdir, cancellable);
                                               composeTreeTaskCount++;
                                               this._commitComposedTreeAsync(runtimeTargetName, 
composeRootdir, relatedTmpPath, cancellable,
                                                                             Lang.bind(this, function(result, 
err) {
diff --git a/src/js/tasks/task-builddisks.js b/src/js/tasks/task-builddisks.js
index d3115f3..2806960 100644
--- a/src/js/tasks/task-builddisks.js
+++ b/src/js/tasks/task-builddisks.js
@@ -115,7 +115,6 @@ const TaskBuildDisks = new Lang.Class({
             try {
                 LibQA.pullDeploy(mntdir, this.repo, osname, targetName, targetRevision,
                                  cancellable);
-                LibQA.configureBootloader(mntdir, osname, cancellable);
                 if (repo)
                     ProcUtil.runSync(['ostree', '--repo=' + 
mntdir.resolve_relative_path('ostree/repo').get_path(),
                                       'remote', 'add', osname, repo, targetName],


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