[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1829/8267] bitbake: toaster: collect details for local dir imported from ui



commit ef617e6f34cd3ad8cb455c9019d2025e5d09c61a
Author: Sujith H <sujith h gmail com>
Date:   Wed Jul 20 08:58:57 2016 +0000

    bitbake: toaster: collect details for local dir imported from ui
    
    Collect the dir path imported from UI and make
    sure that its getting added to bblayers.conf.
    This patch exactly does the same job. Any layer
    which is imported locally need not be cloned
    again to _toaster_clones dir.
    
    [YOCO #9911]
    
    (Bitbake rev: 5669157994fc220a018e37927600988f3fd43271)
    
    Signed-off-by: Sujith H <sujith h gmail com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 .../toaster/bldcontrol/localhostbecontroller.py    |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py 
b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 9364900..283e154 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -89,6 +89,10 @@ class LocalhostBEController(BuildEnvironmentController):
         """ a word of attention: by convention, the first layer for any build will be poky! """
 
         assert self.be.sourcedir is not None
+
+        layerlist = []
+        nongitlayerlist = []
+
         # set layers in the layersource
 
         # 1. get a list of repos with branches, and map dirpaths for each layer
@@ -102,6 +106,13 @@ class LocalhostBEController(BuildEnvironmentController):
             # as it's generated by us layer on if needed
             if CustomImageRecipe.LAYER_NAME in layer.name:
                 continue
+
+            # If we have local layers then we don't need clone them
+            # For local layers giturl will be empty
+            if not layer.giturl:
+                nongitlayerlist.append(layer.layer_version.layer.local_source_dir)
+                continue
+
             if not (layer.giturl, layer.commit) in gitrepos:
                 gitrepos[(layer.giturl, layer.commit)] = []
             gitrepos[(layer.giturl, layer.commit)].append( (layer.name, layer.dirpath) )
@@ -131,7 +142,6 @@ class LocalhostBEController(BuildEnvironmentController):
 
         logger.info("Using pre-checked out source for layer %s", cached_layers)
 
-        layerlist = []
 
 
         # 3. checkout the repositories
@@ -245,6 +255,7 @@ class LocalhostBEController(BuildEnvironmentController):
             layerlist.append(layerpath)
 
         self.islayerset = True
+        layerlist.extend(nongitlayerlist)
         return layerlist
 
     def readServerLogFile(self):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]