Skip to contentSkip to conversation

toaster patchset - fix regressions

PATCH New Michael Wood 1 participant 6 messages Jul 2, 2015

lore
Share & tools
lore
#0 lore raw

cover toaster patchset - fix regressions

This Toaster patchset fixes regressions in current master where toaster is currently not functional. It includes a small number of partial reverts from the previous patch series submitted.

The commits are at:

git://git.yoctoproject.org/poky-contrib michaelw/toaster/fix-remove-mgmtmode-regressions
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=michaelw/toaster/fix-remove-mgmtmode-regressions

Thanks,

Michael

Michael Wood (5):
bitbake: toaster: Partial Revert "fixes after html5 compliance
testing"
bitbake: toaster: Revert the addition of analysis project mode
selection
bitbake: toaster: Remove erroneously committed template include
bitbake: toaster: runbuilds Fix incorrect variable name
bitbake: toaster: Fix build execution regression

 bitbake/lib/bb/ui/toasterui.py                            |  1 +
 bitbake/lib/toaster/bldcontrol/localhostbecontroller.py   |  2 +-
 .../toaster/bldcontrol/management/commands/runbuilds.py   |  2 +-
 bitbake/lib/toaster/orm/models.py                         |  5 ++---
 bitbake/lib/toaster/toastergui/templates/newproject.html  | 15 ++++++++-------
 bitbake/lib/toaster/toastergui/templates/projects.html    |  3 ---
 6 files changed, 13 insertions(+), 15 deletions(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/5 bitbake: toaster: Partial Revert "fixes after html5 compliance testing"

Partial revert of bb commit 7aecb974d44d9bc711ffba5cc65e770811397fba

There were changes in this commit which broke the compatible layers mechanism meaning that no layers, recipes or machines were showing.

---
 bitbake/lib/toaster/orm/models.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
bitbake/lib/toaster/orm/models.py +2 -3
index 7e8ab16..4ea75f2 100644
@@ -180,9 +180,8 @@ class Project(models.Model):
         if release == None:
             release = self.release
         # layers on the same branch or layers specifically set for this project
-        queryset = Layer_Version.objects.filter(Q(project = self) | Q(build__project = self))
-        if release is not None:
-            queryset = queryset.filter(Q(up_branch__name = release.branch_name) & Q(project = None))
+        queryset = Layer_Version.objects.filter((Q(up_branch__name = release.branch_name) & Q(project = None)) | Q(project = self) | Q(build__project = self))
+
         if layer_name is not None:
             # we select only a layer name
             queryset = queryset.filter(layer__name = layer_name)
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/5 bitbake: toaster: Revert the addition of analysis project mode selection

In reply to Michael Wood

Partial revert of bb commit 2efc338cefd6e6e097af83d7dff63e9ba177d021

This feature was not ready to go live as the surrounding implementation work to make this usable has not yet been done.

---
 bitbake/lib/toaster/toastergui/templates/newproject.html | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
bitbake/lib/toaster/toastergui/templates/newproject.html +8 -7
index 1159d71..745b79b 100644
@@ -20,7 +20,7 @@
               <label>Project name <span class="muted">(required)</span></label>
               <input type="text" class="input-xlarge" required id="new-project-name" name="projectname">
             </fieldset>
-
+<!--
             <fieldset>
                 <label class="project-form">Project type</label>
                     <label class="project-form radio"><input type="radio" name="ptype" value="analysis" checked/> Analysis Project</label>
@@ -28,7 +28,8 @@
                 {% if releases.count > 0 %}
                     <label class="project-form radio"><input type="radio" name="ptype" value="build" checked /> Build Project</label>
                 {% endif %}
-            </fieldset>
+              </fieldset> -->
+        <input type="hidden" name="ptype" value="build" />
 
         {% if releases.count > 0 %}
             <fieldset class="release">
@@ -63,7 +64,7 @@
             </div>
         </form>
         </div>
-
+        <!--
         <div class="span5 well">
                 <span class="help-block">
                  <h4>Toaster project types</h4>
@@ -76,7 +77,7 @@
                  <h4>Release</h4>
                  <p>If you create a <strong>build project</strong>, you will need to select a <strong>release</strong>,
                  which is the version of the build system you want to use to run your builds.</p>
-               </div>
+             </div> -->
         </div>
     </div>
 
@@ -109,7 +110,7 @@
                 $('#description-' + new_release).fadeIn();
             });
 
-			// Hide the project release when you select an analysis project
+/*			// Hide the project release when you select an analysis project
 			function projectType() {
 				if ($("input[type='radio']:checked").val() == 'build') {
 					$('.release').fadeIn();
@@ -122,8 +123,8 @@
 
 			$('input:radio').change(function(){
 				projectType();
-			});
-        })
+			}); */
+        });
     </script>
 
 {% endblock %}
Signature · 1 line
2.1.4
#3 lore raw

PATCH 3/5 bitbake: toaster: Remove erroneously committed template include

In reply to Michael Wood

Partial revert of bb commit 6e46e1e3882b9770872d8a0bb459bc7d5d6bfed3

The non managed mrb_section defined the title 'All builds' which is already defined correctly for the projects page as 'All projects'

---
 bitbake/lib/toaster/toastergui/templates/projects.html | 3 ---
 1 file changed, 3 deletions(-)
bitbake/lib/toaster/toastergui/templates/projects.html +0 -3
index e651953..efc3349 100644
@@ -7,9 +7,6 @@
 {% block pagecontent %}
 
 
-  {% include "mrb_section.html" %}
-
-
   <div class="page-header top-air">
       <h1>
       {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
Signature · 1 line
2.1.4
#4 lore raw

PATCH 4/5 bitbake: toaster: runbuilds Fix incorrect variable name

In reply to Michael Wood

The recent refactoring moved this enum value to BuildRequests table rather than Build.

---
 bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +1 -1
index 33cc94e..e3a1fdb 100644
@@ -130,7 +130,7 @@ class Command(NoArgsCommand):
         # update all BuildRequests without a build created
         for br in BuildRequest.objects.filter(build = None):
             br.build = Build.objects.create(project = br.project, completed_on = br.updated, started_on = br.created)
-            br.build.outcome = Build.REQ_FAILED
+            br.build.outcome = BuildRequest.REQ_FAILED
             try:
                 br.build.machine = br.brvariable_set.get(name='MACHINE').value
             except BRVariable.DoesNotExist:
Signature · 1 line
2.1.4
#5 lore raw

PATCH 5/5 bitbake: toaster: Fix build execution regression

In reply to Michael Wood

Make sure the error value is initialised and update the string match that we have to identify bitbake's current startup status.

Patch contribution from Eduard Bartosh

---
 bitbake/lib/bb/ui/toasterui.py                          | 1 +
 bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
bitbake/lib/bb/ui/toasterui.py +1 -0
index 28fdd82..376ac59 100644
@@ -239,6 +239,7 @@ def main(server, eventHandler, params ):
 
             if isinstance(event, (bb.event.BuildCompleted, bb.command.CommandFailed)):
 
+		errorcode = 0
                 if (isinstance(event, bb.command.CommandFailed)):
                     errors += 1
                     errorcode = 1
bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +1 -1
index 3e16837..1d3d1ce 100644
@@ -139,7 +139,7 @@ class LocalhostBEController(BuildEnvironmentController):
             with open(filepath, "r") as f:
                 f.seek(filepos)
                 for line in f:
-                    if line.startswith("NOTE: ToasterUI waiting for events"):
+                    if line.startswith("Bitbake server started on demand"):
                         return True
             return False
 
Signature · 1 line
2.1.4