[gnome-ostree] builddisks: Shorten disk name a bit
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] builddisks: Shorten disk name a bit
- Date: Sat, 8 Jun 2013 00:08:06 +0000 (UTC)
commit 6ca5547a4d0297141be4b5757ce5408e1f901444
Author: Colin Walters <walters verbum org>
Date: Fri Jun 7 20:07:23 2013 -0400
builddisks: Shorten disk name a bit
Reported-By: Zeeshan Ali (Khattak)
src/js/tasks/task-builddisks.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/js/tasks/task-builddisks.js b/src/js/tasks/task-builddisks.js
index 7e37dd2..9de03a9 100644
--- a/src/js/tasks/task-builddisks.js
+++ b/src/js/tasks/task-builddisks.js
@@ -93,8 +93,8 @@ const TaskBuildDisks = new Lang.Class({
if (!matched)
continue;
let targetRevision = buildData['targets'][targetName];
- let squashedName = targetName.replace(/\//g, '_');
- let diskName = osname + '-' + squashedName + '-disk.qcow2';
+ let squashedName = osname + '-' + targetName.substr(targetName.lastIndexOf('/') + 1);
+ let diskName = squashedName + '.qcow2';
let diskPath = workImageDir.get_child(diskName);
let prevPath = currentImageLink.get_child(diskName);
GSystem.shutil_rm_rf(diskPath, cancellable);
@@ -103,7 +103,7 @@ const TaskBuildDisks = new Lang.Class({
} else {
LibQA.createDisk(diskPath, cancellable);
}
- let mntdir = subworkdir.get_child('mnt-' + osname + '-' + squashedName);
+ let mntdir = subworkdir.get_child('mnt-' + squashedName);
GSystem.file_ensure_directory(mntdir, true, cancellable);
let gfmnt = new GuestFish.GuestMount(diskPath, { partitionOpts: LibQA.DEFAULT_GF_PARTITION_OPTS,
readWrite: true });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]