[gnome-ostree] autobuilder: Clean up resolve logic



commit 8085d7bd02b7dda4dd016a896c488c60a2515de1
Author: Colin Walters <walters verbum org>
Date:   Sun Feb 10 14:22:22 2013 -0500

    autobuilder: Clean up resolve logic

 src/ostbuild/js/builtins/autobuilder.js |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/ostbuild/js/builtins/autobuilder.js b/src/ostbuild/js/builtins/autobuilder.js
index b437175..d2f36f7 100644
--- a/src/ostbuild/js/builtins/autobuilder.js
+++ b/src/ostbuild/js/builtins/autobuilder.js
@@ -56,7 +56,6 @@ const Autobuilder = new Lang.Class({
 
 	this._buildNeeded = true;
 	this._fullResolveNeeded = true;
-	this._resolveNeeded = false;
 	this._resolveTimeout = 0;
 	this._sourceSnapshotPath = null;
 	this._prevSourceSnapshotPath = null;
@@ -143,16 +142,12 @@ const Autobuilder = new Lang.Class({
 	let matchingComponents = [];
 	let snapshotData = this._src_db.loadFromPath(this._sourceSnapshotPath, null);
 	let snapshot = new Snapshot.Snapshot(snapshotData, this._sourceSnapshotPath);
-	let matched = false;
 	for (let i = 0; i < srcUrls.length; i++) {
 	    let matches = snapshot.getMatchingSrc(srcUrls[i]);
 	    for (let j = 0; j < matches.length; j++) {
 		this._queuedForceResolve.push.apply(this._queuedForceResolve, matches[i]['name']);
-		matched = true;
 	    }
 	}
-	if (matched)
-	    this._resolveNeeded = true;
 	this._runResolve();
     },
     
@@ -165,7 +160,7 @@ const Autobuilder = new Lang.Class({
     _runResolve: function() {
 	let cancellable = null;
 	
-	if (!(this._resolveNeeded || this._fullResolveNeeded))
+	if (!(this._queuedForceResolve.length > 0 || this._fullResolveNeeded))
 	    return;
 
 	if (this._taskmaster.isTaskQueued(this._resolveTaskName))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]