[gnome-continuous] tasks: Use a sub-directory for the builddisk path
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] tasks: Use a sub-directory for the builddisk path
- Date: Mon, 24 Apr 2017 09:49:23 +0000 (UTC)
commit c4b0c32d12bcdb610e51f95526b68be65867f250
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Apr 24 10:47:38 2017 +0100
tasks: Use a sub-directory for the builddisk path
GuestMount will try to put a lock file under the parent, which means
that the mount directory won't be empty. We solve this by adding a
separate directory for the mount.
src/js/tasks/task-builddisks.js | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/js/tasks/task-builddisks.js b/src/js/tasks/task-builddisks.js
index e04c803..58ea390 100644
--- a/src/js/tasks/task-builddisks.js
+++ b/src/js/tasks/task-builddisks.js
@@ -119,7 +119,8 @@ const TaskBuildDisks = new Lang.Class({
}
// Not indented to avoid too much code motion
try {
- let tmpdir_path = this.workdir.get_child('tmp');
+ // We need to create a temporary path under 'disks' for the Guestfish lock file
+ let tmpdir_path = this.workdir.get_child('disks').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 +131,7 @@ const TaskBuildDisks = new Lang.Class({
cancellable);
} finally {
gfmnt.umount(cancellable);
- GSystem.shutil_rm_rf(mntdir, cancellable);
+ GSystem.shutil_rm_rf(tmpdir_path, 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]