[oe-commits] [bitbake] 16/16: toaster: buildinfohelper local layer don't construct path using git info

git at git.openembedded.org git at git.openembedded.org
Tue Sep 20 14:28:18 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 3dfea5214d4bd006e26630e5024774ecb84ea527
Author: Michael Wood <michael.g.wood at intel.com>
AuthorDate: Mon Sep 19 18:44:20 2016 -0700

    toaster: buildinfohelper local layer don't construct path using git info
    
    When the layer is local source don't try and work out the location of
    the layer by using the git information (getGitCloneDirectory)
    
    [YOCTO #10199]
    
    Signed-off-by: Michael Wood <michael.g.wood at intel.com>
    Signed-off-by: bavery <brian.avery at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/ui/buildinfohelper.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 2246960..b2c74dd 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -451,7 +451,11 @@ class ORMWrapper(object):
             # note that this is different
             buildrequest = BuildRequest.objects.get(pk = br_id)
             for brl in buildrequest.brlayer_set.all():
-                localdirname = os.path.join(bc.getGitCloneDirectory(brl.giturl, brl.commit), brl.dirpath)
+                if brl.local_source_dir:
+                    localdirname = os.path.join(brl.local_source_dir,
+                                                brl.dirpath)
+                else:
+                    localdirname = os.path.join(bc.getGitCloneDirectory(brl.giturl, brl.commit), brl.dirpath)
                 # we get a relative path, unless running in HEAD mode where the path is absolute
                 if not localdirname.startswith("/"):
                     localdirname = os.path.join(bc.be.sourcedir, localdirname)
@@ -981,8 +985,6 @@ class BuildInfoHelper(object):
     def _get_layer_version_for_path(self, path):
         self._ensure_build()
 
-        assert path.startswith("/")
-
         def _slkey_interactive(layer_version):
             assert isinstance(layer_version, Layer_Version)
             return len(layer_version.local_path)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list