[bitbake-devel] [PATCH 01/22] toaster: Fix build button current project race

Alex DAMIAN alexandru.damian at intel.com
Thu May 28 14:13:55 UTC 2015


From: Michael Wood <michael.g.wood at intel.com>

Make sure the current project value is set before we check to see if the
project is buildable. Also update the blacklist url patterns where we
aren't displaying the button.

[YOCTO #7739]

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
 lib/toaster/toastergui/static/js/base.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/toastergui/static/js/base.js b/lib/toaster/toastergui/static/js/base.js
index c4c96c8..ccc23e0 100644
--- a/lib/toaster/toastergui/static/js/base.js
+++ b/lib/toaster/toastergui/static/js/base.js
@@ -6,11 +6,13 @@ function basePageInit (ctx) {
   /* Hide the button if we're on the project,newproject or importlyaer page
    * or if there are no projects yet defined
    */
-  if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d/$|importlayer/$') > 0){
+  if (ctx.numProjects == 0 || ctx.currentUrl.search('newproject|project/\\d$|importlayer$') > 0){
       newBuildButton.hide();
       return;
   }
 
+  var currentProjectId = libtoaster.ctx.projectId;
+
   /* Hide the change project icon when there is only one project */
   if (ctx.numProjects == 1){
      $('#project .icon-pencil').hide(); 
@@ -21,7 +23,6 @@ function basePageInit (ctx) {
   _checkProjectBuildable()
   _setupNewBuildButton();
 
-  var currentProjectId = libtoaster.ctx.projectId;
 
   function _checkProjectBuildable(){
     if (currentProjectId == undefined)
-- 
1.9.1




More information about the bitbake-devel mailing list