]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/recipeutils: fix find_layerdir() to return absolute paths
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 7 Nov 2017 20:45:06 +0000 (09:45 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Nov 2017 14:44:31 +0000 (14:44 +0000)
find_layerdir() should really return absolute paths, so make it do so.
This fixes devtool finish not deleting files it should do after devtool
upgrade if the specified path is relative, since the devtool finish code
was assuming that find_layerdir() was returning an absolute path.

Fixes [YOCTO #12318].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/recipeutils.py

index c8570acf9e7c9ed455211c112a338fb02b648a70..2f818bcbaa38a6c250479044a2f052104e210dc6 100644 (file)
@@ -801,7 +801,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
 
 def find_layerdir(fn):
     """ Figure out the path to the base of the layer containing a file (e.g. a recipe)"""
-    pth = fn
+    pth = os.path.abspath(fn)
     layerdir = ''
     while pth:
         if os.path.exists(os.path.join(pth, 'conf', 'layer.conf')):