GNOME Bugzilla – Bug 732389
task-builddisks: allows restricting to particular specific targets
Last modified: 2014-07-09 20:49:23 UTC
Rebuilding disk images can be slow, even when they can be incrementally updated. Allow, e.g.: make -n builddisks targets='["x86_64-runtime"]' To rebuild only a subset of the disk images.
Created attachment 279486 [details] [review] task-builddisks: allows restricting to particular specific targets
Review of attachment 279486 [details] [review]: This would seem cleaner if we filtered ::: src/js/tasks/task-builddisks.js @@ +89,3 @@ + break; + } + } I think this would be cleaner if we filtered the targets array before dropping into this loop, since conceptually they're independent. (Although your patch does allow building disks *not* in _onlyTreeSuffixes, but I don't think we need/want that)
Created attachment 279606 [details] [review] task-builddisks: allows restricting to particular specific targets Here's a new version that filters the list of targets before the loop. (Looking forward to reasonable iteration over arrays with 'for ... of'!) ==== Rebuilding disk images can be slow, even when they can be incrementally updated. Allow, e.g.: make -n builddisks targets='["x86_64-runtime"]' To rebuild only a subset of the disk images.
Review of attachment 279606 [details] [review]: One minor comment, please push after updating. Thanks!a ::: src/js/tasks/task-builddisks.js @@ +94,3 @@ let matched = false; + for (let j = 0; j < this._onlyTreeSuffixes.length; j++) { + if (JSUtil.stringEndswith(targetName, this._onlyTreeSuffixes[j])) { Don't need this i -> j hunk anymore.
(In reply to comment #4) > Review of attachment 279606 [details] [review]: > > One minor comment, please push after updating. Thanks!a > > ::: src/js/tasks/task-builddisks.js > @@ +94,3 @@ > let matched = false; > + for (let j = 0; j < this._onlyTreeSuffixes.length; j++) { > + if (JSUtil.stringEndswith(targetName, > this._onlyTreeSuffixes[j])) { > > Don't need this i -> j hunk anymore. How so? It still looks needed to me - there's a loop over i surrounding this.
Ah yes, I was wrong. Looks good then, thanks!
Attachment 279606 [details] pushed as 6799710 - task-builddisks: allows restricting to particular specific targets