toaster: cummulative 11072017 patch
cover toaster: cummulative 11072017 patch
From: David Reyna <[email protected]>
This cumulative patch has the following fixes:
9971 Toaster does not report progress while setscene tasks are running 11727 trim build target input
11744 set clone progress default to off
The following changes since commit 1501ab0c6ea7ed7a2565b8fdf95a6ade81c3b2f7:
libiconv: remove 0001-Fix-link-error-when-compiling-with-gcc-O0.patch (2017-07-11 15:57:08 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib dreyna/submit/dreyna/toaster/cummulative_110717_patch
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=dreyna/submit/dreyna/toaster/cummulative_110717_patch
David Reyna (3):
toaster: include setscene in task progress
toaster: set clone progress default to off
toaster: trim build target input
lib/toaster/orm/migrations/0016_clone_progress.py | 4 ++-- lib/toaster/orm/models.py | 11 ++++++----- lib/toaster/toastergui/static/js/projecttopbar.js | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 toaster: include setscene in task progress
From: David Reyna <[email protected]>
Change the task progress counting from the task order field which excludes setscene to the task completion field which counts all completed tasks regardless of type.
[YOCTO #9971]
--- lib/toaster/orm/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
lib/toaster/orm/models.py +4 -3
@@ -508,7 +508,7 @@ class Build(models.Model): tf = Task.objects.filter(build = self) tfc = tf.count() if tfc > 0: - completeper = tf.exclude(order__isnull=True).count()*100 // tfc + completeper = tf.exclude(outcome=Task.OUTCOME_NA).count()*100 // tfc else: completeper = 0 return completeper
@@ -709,10 +709,11 @@ class Build(models.Model): tasks. Note that the mechanism for testing whether a Task is "done" is whether - its order field is set, as per the completeper() method. + its outcome field is set, as per the completeper() method. """ return self.outcome == Build.IN_PROGRESS and \ - self.task_build.filter(order__isnull=False).count() == 0 + self.task_build.exclude(outcome=Task.OUTCOME_NA).count() == 0 + def get_state(self): """
Signature · 1 line
1.9.1
PATCH 2/3 toaster: set clone progress default to off
In reply to David ReynaFrom: David Reyna <[email protected]>
Set the clone progress to be off by default for the benefit of command line projects and 'Local Yocto' builds. For Toaster managed projects that do use the clone feature the clone progress status is already explicitly set by the existing code and thus displayed.
[YOCTO #11744]
--- lib/toaster/orm/migrations/0016_clone_progress.py | 4 ++-- lib/toaster/orm/models.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
lib/toaster/orm/migrations/0016_clone_progress.py +2 -2
@@ -13,12 +13,12 @@ class Migration(migrations.Migration): migrations.AddField( model_name='build', name='repos_cloned', - field=models.IntegerField(default=0), + field=models.IntegerField(default=1), ), migrations.AddField( model_name='build', name='repos_to_clone', - field=models.IntegerField(default=1), + field=models.IntegerField(default=1), # (default off) ), ]
lib/toaster/orm/models.py +2 -2
@@ -456,8 +456,8 @@ class Build(models.Model): # number of repos to clone for this build repos_to_clone = models.IntegerField(default=1) - # number of repos cloned so far for this build - repos_cloned = models.IntegerField(default=0) + # number of repos cloned so far for this build (default off) + repos_cloned = models.IntegerField(default=1) @staticmethod def get_recent(project=None):
Signature · 1 line
1.9.1
PATCH 3/3 toaster: trim build target input
In reply to David ReynaFrom: David Reyna <[email protected]>
Trim the entered built target value so that Toaster is not confused with no real targets nor a ghost second target.
[YOCTO #11727]
--- lib/toaster/toastergui/static/js/projecttopbar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/toaster/toastergui/static/js/projecttopbar.js +2 -2
@@ -73,14 +73,14 @@ function projectTopBarInit(ctx) { newBuildTargetBuildBtn.click(function (e) { e.preventDefault(); - if (!newBuildTargetInput.val()) { + if (!newBuildTargetInput.val().trim()) { return; } /* We use the value of the input field so as to maintain any command also * added e.g. core-image-minimal:clean and because we can build targets * that toaster doesn't yet know about */ - selectedTarget = { name: newBuildTargetInput.val() }; + selectedTarget = { name: newBuildTargetInput.val().trim() }; /* Fire off the build */ libtoaster.startABuild(null, selectedTarget.name,
Signature · 1 line
1.9.1