summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2017-06-27 13:44:29 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-28 16:02:15 +0100
commit43aaa802c35ecc9d972f3b9adcd060033de1d9de (patch)
treebd8e0fd2ec8c01df2316538ac07527fe67823e6b /bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
parentd74bcbeaf241a67871d62b7e2c17900ae900642e (diff)
downloadpoky-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/bldcontrol/localhostbecontroller.py')
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 62e62fe19e..291624625b 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -85,6 +85,11 @@ class LocalhostBEController(BuildEnvironmentController):
85 return local_checkout_path 85 return local_checkout_path
86 86
87 87
88 def setCloneStatus(self,bitbake,status,total,current):
89 bitbake.req.build.repos_cloned=current
90 bitbake.req.build.repos_to_clone=total
91 bitbake.req.build.save()
92
88 def setLayers(self, bitbake, layers, targets): 93 def setLayers(self, bitbake, layers, targets):
89 """ a word of attention: by convention, the first layer for any build will be poky! """ 94 """ a word of attention: by convention, the first layer for any build will be poky! """
90 95
@@ -147,7 +152,13 @@ class LocalhostBEController(BuildEnvironmentController):
147 logger.info("Using pre-checked out source for layer %s", cached_layers) 152 logger.info("Using pre-checked out source for layer %s", cached_layers)
148 153
149 # 3. checkout the repositories 154 # 3. checkout the repositories
155 clone_count=0
156 clone_total=len(gitrepos.keys())
157 self.setCloneStatus(bitbake,'Started',clone_total,clone_count)
150 for giturl, commit in gitrepos.keys(): 158 for giturl, commit in gitrepos.keys():
159 self.setCloneStatus(bitbake,'progress',clone_total,clone_count)
160 clone_count += 1
161
151 localdirname = os.path.join(self.be.sourcedir, self.getGitCloneDirectory(giturl, commit)) 162 localdirname = os.path.join(self.be.sourcedir, self.getGitCloneDirectory(giturl, commit))
152 logger.debug("localhostbecontroller: giturl %s:%s checking out in current directory %s" % (giturl, commit, localdirname)) 163 logger.debug("localhostbecontroller: giturl %s:%s checking out in current directory %s" % (giturl, commit, localdirname))
153 164
@@ -198,6 +209,7 @@ class LocalhostBEController(BuildEnvironmentController):
198 if name != "bitbake": 209 if name != "bitbake":
199 layerlist.append(localdirpath.rstrip("/")) 210 layerlist.append(localdirpath.rstrip("/"))
200 211
212 self.setCloneStatus(bitbake,'complete',clone_total,clone_count)
201 logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist)) 213 logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist))
202 214
203 # 5. create custom layer and add custom recipes to it 215 # 5. create custom layer and add custom recipes to it