diff options
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(): |