diff options
author | David Reyna <David.Reyna@windriver.com> | 2017-06-27 13:44:29 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-28 16:02:15 +0100 |
commit | 43aaa802c35ecc9d972f3b9adcd060033de1d9de (patch) | |
tree | bd8e0fd2ec8c01df2316538ac07527fe67823e6b /bitbake/lib/toaster/orm/models.py | |
parent | d74bcbeaf241a67871d62b7e2c17900ae900642e (diff) | |
download | poky-43aaa802c35ecc9d972f3b9adcd060033de1d9de.tar.gz |
bitbake: toaster: git clone progress bar
If a project has a lot of additional layers, the build may
appear to hang while those layers are checked out.
This patch adds a clone progress bar that is visible before
the parsing progress appears.
[YOCTO #9916]
(Bitbake rev: 0c94d947b74c4dee23d7b9d255facd3cf839ccbe)
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/orm/models.py')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index a49f9a432a..13bd11704a 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -437,6 +437,12 @@ class Build(models.Model): | |||
437 | # number of recipes parsed so far for this build | 437 | # number of recipes parsed so far for this build |
438 | recipes_parsed = models.IntegerField(default=0) | 438 | recipes_parsed = models.IntegerField(default=0) |
439 | 439 | ||
440 | # number of repos to clone for this build | ||
441 | repos_to_clone = models.IntegerField(default=1) | ||
442 | |||
443 | # number of repos cloned so far for this build | ||
444 | repos_cloned = models.IntegerField(default=0) | ||
445 | |||
440 | @staticmethod | 446 | @staticmethod |
441 | def get_recent(project=None): | 447 | def get_recent(project=None): |
442 | """ | 448 | """ |
@@ -667,6 +673,13 @@ class Build(models.Model): | |||
667 | else: | 673 | else: |
668 | return False | 674 | return False |
669 | 675 | ||
676 | def is_cloning(self): | ||
677 | """ | ||
678 | True if the build is still cloning repos | ||
679 | """ | ||
680 | return self.outcome == Build.IN_PROGRESS and \ | ||
681 | self.repos_cloned < self.repos_to_clone | ||
682 | |||
670 | def is_parsing(self): | 683 | def is_parsing(self): |
671 | """ | 684 | """ |
672 | True if the build is still parsing recipes | 685 | True if the build is still parsing recipes |
@@ -698,6 +711,8 @@ class Build(models.Model): | |||
698 | return 'Cancelling'; | 711 | return 'Cancelling'; |
699 | elif self.is_queued(): | 712 | elif self.is_queued(): |
700 | return 'Queued' | 713 | return 'Queued' |
714 | elif self.is_cloning(): | ||
715 | return 'Cloning' | ||
701 | elif self.is_parsing(): | 716 | elif self.is_parsing(): |
702 | return 'Parsing' | 717 | return 'Parsing' |
703 | elif self.is_starting(): | 718 | elif self.is_starting(): |