[gnome-continuous] Allow local patches by looking at overrides/
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] Allow local patches by looking at overrides/
- Date: Mon, 30 Jun 2014 14:31:09 +0000 (UTC)
commit 8861e6f12693d1bbc162096afadf1e744bedc50f
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Jun 5 16:50:25 2014 -0400
Allow local patches by looking at overrides/
When working on patches, it's useful to be able to work with
them locally without having to modify the patches src in
manifest.json. Follow the overrides pattern and allow:
ln -s <path-to>/gnome-continuous overrides/patches
https://bugzilla.gnome.org/show_bug.cgi?id=732392
src/js/builtins/checkout.js | 6 +++---
src/js/tasks/task-build.js | 3 ++-
src/js/vcs.js | 6 +++++-
3 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/js/builtins/checkout.js b/src/js/builtins/checkout.js
index 2a33ea7..27a0afd 100644
--- a/src/js/builtins/checkout.js
+++ b/src/js/builtins/checkout.js
@@ -28,7 +28,7 @@ const Params = imports.params;
const BuildUtil = imports.buildutil;
const Vcs = imports.vcs;
-function _checkoutOneComponent(mirrordir, patchdir, component, cancellable, params) {
+function _checkoutOneComponent(workdir, mirrordir, patchdir, component, cancellable, params) {
params = Params.parse(params, { checkoutdir: null,
clean: false,
patchesPath: null,
@@ -123,7 +123,7 @@ const Checkout = new Lang.Class({
component = this._snapshot.getExpanded(componentName);
}
- _checkoutOneComponent(this.mirrordir, this.patchdir, component, cancellable,
+ _checkoutOneComponent(this.workdir, this.mirrordir, this.patchdir, component, cancellable,
{ checkoutdir: args.checkoutdir,
clean: args.clean,
patchesPath: args.patches_path,
@@ -132,7 +132,7 @@ const Checkout = new Lang.Class({
let all = this._snapshot.getAllComponentNames();
for (let i = 0; i < all.length; i++) {
let component = this._snapshot.getExpanded(all[i]);
- _checkoutOneComponent(this.mirrordir, this.patchdir, component, cancellable,
+ _checkoutOneComponent(this.workdir, this.mirrordir, this.patchdir, component, cancellable,
{ checkoutdir: args.checkoutdir,
clean: args.clean,
patchesPath: args.patches_path,
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index 906fc62..098b3b4 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -604,7 +604,8 @@ const TaskBuild = new Lang.Class({
if (this._cachedPatchdirRevision == patchesRevision) {
patchdir = this.patchdir;
} else {
- patchdir = Vcs.checkoutPatches(this.mirrordir,
+ patchdir = Vcs.checkoutPatches(this.workdir,
+ this.mirrordir,
this.patchdir,
expandedComponent,
cancellable);
diff --git a/src/js/vcs.js b/src/js/vcs.js
index 4957ea1..b73226c 100644
--- a/src/js/vcs.js
+++ b/src/js/vcs.js
@@ -137,7 +137,11 @@ function parseSrcKey(srckey) {
return [keytype, uri];
}
-function checkoutPatches(mirrordir, patchdir, component, cancellable) {
+function checkoutPatches(workdir, mirrordir, patchdir, component, cancellable) {
+ let overridePath = workdir.resolve_relative_path('overrides/patches');
+ if (overridePath.query_exists(null))
+ return overridePath;
+
let patches = component['patches'];
let [patchesKeytype, patchesUri] = parseSrcKey(patches['src']);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]