autobuilder: Add onlyTreesMatching parameter to build

This is a convenient way to test, run:

$ rpm-ostree-autobuilder make -n build onlyTreesMatching=\"20/x86_64/base/minimal"
This commit is contained in:
Colin Walters 2014-01-20 11:58:34 -05:00
parent b92d00c4c2
commit bf0acf54ed

View File

@ -42,7 +42,7 @@ const TaskBuild = new Lang.Class({
TaskName: "build", TaskName: "build",
}, },
DefaultParameters: {forceComponents: []}, DefaultParameters: {onlyTreesMatching: null},
_composeProduct: function(ref, productName, treeName, treeData, release, architecture, cancellable) { _composeProduct: function(ref, productName, treeName, treeData, release, architecture, cancellable) {
let repos = ['fedora-' + release]; let repos = ['fedora-' + release];
@ -100,6 +100,11 @@ const TaskBuild = new Lang.Class({
let release = releases[i]; let release = releases[i];
let architecture = architectures[j]; let architecture = architectures[j];
let ref = [this._productData['osname'], release, architecture, productName, treeName].join('/'); let ref = [this._productData['osname'], release, architecture, productName, treeName].join('/');
if (this.parameters.onlyTreesMatching &&
ref.indexOf(this.parameters.onlyTreesMatching) == -1) {
log("Skipping " + ref + " which does not match " + this.parameters.onlyTreesMatching);
continue;
}
if (this._composeProduct(ref, productName, treeName, products[productName][treeName], if (this._composeProduct(ref, productName, treeName, products[productName][treeName],
release, architecture, release, architecture,
cancellable)) cancellable))