[gnome-continuous] tasks: Do not use tmpdir for the disk build



commit 7ea2adb0c094ae3abdf5cf7b6cd528975eb0835c
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Apr 24 09:54:35 2017 +0100

    tasks: Do not use tmpdir for the disk build
    
    The default temporary directory could be a tmpfs volume, and it's
    usually mounted noexec. There's no guarantee we can actually a task
    into it. Instead, use a sub-directory in the work directory.

 src/js/tasks/task-builddisks.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/js/tasks/task-builddisks.js b/src/js/tasks/task-builddisks.js
index 94a02fb..e04c803 100644
--- a/src/js/tasks/task-builddisks.js
+++ b/src/js/tasks/task-builddisks.js
@@ -119,7 +119,7 @@ const TaskBuildDisks = new Lang.Class({
             }
             // Not indented to avoid too much code motion
             try {
-            let tmpdir_path = Gio.File.new_for_path(GLib.dir_make_tmp("continuous-XXXXXX"));
+            let tmpdir_path = this.workdir.get_child('tmp');
             let mntdir = tmpdir_path.get_child('mnt-' + squashedName);
             GSystem.file_ensure_directory(mntdir, true, cancellable);
             let gfmnt = new GuestFish.GuestMount(diskPath, { partitionOpts: LibQA.DEFAULT_GF_PARTITION_OPTS,
@@ -130,7 +130,7 @@ const TaskBuildDisks = new Lang.Class({
                                  cancellable);
             } finally {
                 gfmnt.umount(cancellable);
-                GSystem.shutil_rm_rf(tmpdir_path, cancellable);
+                GSystem.shutil_rm_rf(mntdir, cancellable);
             }
             // Assume previous disks have successfully installed a bootloader
             if (!doCloneDisk) {


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