[gnome-continuous] libqa: rearrange some set_disable_fsync commands



commit 71877dbf1db13a421e573487b6e25f9847b929ba
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Mon Jan 26 16:54:22 2015 +0100

    libqa: rearrange some set_disable_fsync commands

 src/js/tasks/task-build.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index f20a6aa..934588f 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -881,11 +881,12 @@ const TaskBuild = new Lang.Class({
                                           OSTree.RepoCheckoutOverwriteMode.UNION_FILES,
                                           composeRootdir, subtree, subtreeInfo, cancellable);
         }));
-       this.ostreeRepo.set_disable_fsync(false);
 
        if (params.runTriggers)
            this._runTriggersInRoot(composeRootdir, cancellable);
 
+       this.ostreeRepo.set_disable_fsync(false);
+
         let contentsPath = composeRootdir.resolve_relative_path('usr/share/contents.json');
        GSystem.file_ensure_directory(contentsPath.get_parent(), true, cancellable);
         JsonUtil.writeJsonFileAtomic(contentsPath, this._snapshot.data, cancellable);
@@ -977,13 +978,13 @@ const TaskBuild = new Lang.Class({
        print("Preparing commit of " + composeRootdir.get_path() + " to " + targetName);
        let rev;
        BuildUtil.timeSubtask("compose " + targetName, Lang.bind(this, function() {
-           this.ostreeRepo.set_disable_fsync(false);
+           this.ostreeRepo.set_disable_fsync(true);
             this.ostreeRepo.prepare_transaction(cancellable);
             this.ostreeRepo.scan_hardlinks(cancellable);
             let file = this._writeMtreeFromDirectory(composeRootdir, [], cancellable);
             rev = this._commit(treename, "Compose", file, cancellable, { version: this._buildName });
             this.ostreeRepo.commit_transaction(cancellable);
-           this.ostreeRepo.set_disable_fsync(true);
+           this.ostreeRepo.set_disable_fsync(false);
        }));
         print("Compose of " + targetName + " is " + rev);
 


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