From 43aaa802c35ecc9d972f3b9adcd060033de1d9de Mon Sep 17 00:00:00 2001 From: David Reyna Date: Tue, 27 Jun 2017 13:44:29 -0700 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bitbake/lib/toaster/orm/models.py') 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): # number of recipes parsed so far for this build recipes_parsed = models.IntegerField(default=0) + # 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) + @staticmethod def get_recent(project=None): """ @@ -667,6 +673,13 @@ class Build(models.Model): else: return False + def is_cloning(self): + """ + True if the build is still cloning repos + """ + return self.outcome == Build.IN_PROGRESS and \ + self.repos_cloned < self.repos_to_clone + def is_parsing(self): """ True if the build is still parsing recipes @@ -698,6 +711,8 @@ class Build(models.Model): return 'Cancelling'; elif self.is_queued(): return 'Queued' + elif self.is_cloning(): + return 'Cloning' elif self.is_parsing(): return 'Parsing' elif self.is_starting(): -- cgit v1.2.3-54-g00ecf