[gnome-ostree/wip/new-model: 31/34] build: Remove subworkdir
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree/wip/new-model: 31/34] build: Remove subworkdir
- Date: Thu, 11 Jul 2013 17:17:11 +0000 (UTC)
commit 0bc099a4afff972b51c231526e499f84913278b6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Jun 19 18:05:43 2013 -0400
build: Remove subworkdir
It's just the cwd.
src/js/tasks/task-bdiff.js | 2 --
src/js/tasks/task-build.js | 8 +++-----
src/js/tasks/task-builddisks.js | 8 +++-----
3 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/src/js/tasks/task-bdiff.js b/src/js/tasks/task-bdiff.js
index a30e341..d1cffff 100644
--- a/src/js/tasks/task-bdiff.js
+++ b/src/js/tasks/task-bdiff.js
@@ -83,8 +83,6 @@ const TaskBdiff = new Lang.Class({
},
execute: function(cancellable) {
- this.subworkdir = Gio.File.new_for_path('.');
-
let builddb = this._getResultDb('build');
let latestPath = builddb.getLatestPath();
if (!latestPath)
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index d142d97..4625247 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -706,7 +706,7 @@ const TaskBuild = new Lang.Class({
_checkoutOneTreeCoreAsync: function(name, composeContents, cancellable, callback,
params) {
params = Params.parse(params, { runTriggers: true });
- let composeRootdir = this.subworkdir.get_child(name);
+ let composeRootdir = Gio.File.new_for_path(name);
print("Checking out " + composeRootdir.get_path());
GSystem.shutil_rm_rf(composeRootdir, cancellable);
GSystem.file_ensure_directory(composeRootdir, true, cancellable);
@@ -1079,7 +1079,7 @@ const TaskBuild = new Lang.Class({
_buildBase: function(architecture, cancellable) {
let basemeta = this._snapshot.getExpanded(this._snapshot.data['base']['name']);
let basename = basemeta['name'];
- let buildWorkdir = this.subworkdir.get_child('build-' + basemeta['name'] + '-' + architecture);
+ let buildWorkdir = Gio.File.new_for_path('build-' + basemeta['name'] + '-' + architecture);
let checkoutdir = buildWorkdir.get_child(basemeta['name']);
let builddirName = Format.vprintf('build-%s-%s', [basename, architecture]);
let builddir = this.workdir.get_child(builddirName);
@@ -1163,8 +1163,6 @@ const TaskBuild = new Lang.Class({
},
execute: function(cancellable) {
- this.subworkdir = Gio.File.new_for_path('.');
-
this.forceBuildComponents = {};
for (let i = 0; i < this.parameters.forceComponents.length; i++)
this.forceBuildComponents[this.parameters.forceComponents[i]] = true;
@@ -1173,7 +1171,7 @@ const TaskBuild = new Lang.Class({
let snapshotDir = this.workdir.get_child('snapshots');
let srcdb = new JsonDB.JsonDB(snapshotDir);
let snapshotPath = srcdb.getLatestPath();
- let workingSnapshotPath = this.subworkdir.get_child(snapshotPath.get_basename());
+ let workingSnapshotPath = Gio.File.new_for_path(snapshotPath.get_basename());
GSystem.file_linkcopy(snapshotPath, workingSnapshotPath, Gio.FileCopyFlags.OVERWRITE,
cancellable);
let data = srcdb.loadFromPath(workingSnapshotPath, cancellable);
diff --git a/src/js/tasks/task-builddisks.js b/src/js/tasks/task-builddisks.js
index c7c87c8..b42747f 100644
--- a/src/js/tasks/task-builddisks.js
+++ b/src/js/tasks/task-builddisks.js
@@ -53,8 +53,6 @@ const TaskBuildDisks = new Lang.Class({
_onlyTreeSuffixes: ['-runtime'],
execute: function(cancellable) {
- let subworkdir = Gio.File.new_for_path('.');
-
let baseImageDir = this.workdir.resolve_relative_path(this._imageSubdir);
let baseImageVersionedDir = new VersionedDir.VersionedDir(baseImageDir, this._VERSION_RE);
GSystem.file_ensure_directory(baseImageDir, true, cancellable);
@@ -74,7 +72,7 @@ const TaskBuildDisks = new Lang.Class({
return;
}
- let workImageDir = subworkdir.get_child('images');
+ let workImageDir = Gio.File.new_for_path('images');
GSystem.file_ensure_directory(workImageDir, true, cancellable);
let destPath = workImageDir.get_child('build-' + buildVersion + '.json');
@@ -107,7 +105,7 @@ const TaskBuildDisks = new Lang.Class({
} else {
LibQA.createDisk(diskPath, cancellable);
}
- let mntdir = subworkdir.get_child('mnt-' + squashedName);
+ let mntdir = Gio.File.new_for_path('mnt-' + squashedName);
GSystem.file_ensure_directory(mntdir, true, cancellable);
let gfmnt = new GuestFish.GuestMount(diskPath, { partitionOpts: LibQA.DEFAULT_GF_PARTITION_OPTS,
readWrite: true });
@@ -120,7 +118,7 @@ const TaskBuildDisks = new Lang.Class({
}
// Assume previous disks have successfully installed a bootloader
if (!doCloneDisk) {
- LibQA.bootloaderInstall(diskPath, subworkdir, osname, cancellable);
+ LibQA.bootloaderInstall(diskPath, Gio.File.new_for_path('.'), osname, cancellable);
print("Bootloader installation complete");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]