Commit c4b0c32d authored by Emmanuele Bassi's avatar Emmanuele Bassi

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.
parent 0db9a082
......@@ -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({
} finally {
GSystem.shutil_rm_rf(mntdir, cancellable);
GSystem.shutil_rm_rf(tmpdir_path, cancellable);
// Assume previous disks have successfully installed a bootloader
if (!doCloneDisk) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment