]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: create: fix mapping python dependencies to python-dbg package
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 1 Sep 2016 02:25:04 +0000 (14:25 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Sep 2016 23:36:43 +0000 (00:36 +0100)
When trying to map python module dependencies to the packages that
provide them, if we're looking for .so files that satisfy
dependencies then we need to exclude files found under the .debug
directory, otherwise the dependency will get mapped to the python-dbg
package which isn't correct.

For example, this fixes creating a recipe for pyserial and not getting
python-fcntl in RDEPENDS_${PN}, leading to errors when trying to use the
serial module on the target.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
scripts/lib/recipetool/create_buildsys_python.py

index aff13cf1d2cb17f806d3f9794a1717b6842c08b9..fb9806d31821b5027c02a93fd5258d96bb9401ca 100644 (file)
@@ -504,8 +504,10 @@ class PythonRecipeHandler(RecipeHandler):
         for dep in scanned_deps:
             mapped = provided_packages.get(dep)
             if mapped:
+                logger.debug('Mapped %s to %s' % (dep, mapped))
                 mapped_deps.add(mapped)
             else:
+                logger.debug('Could not map %s' % dep)
                 unmapped_deps.add(dep)
         return mapped_deps, unmapped_deps
 
@@ -566,6 +568,8 @@ class PythonRecipeHandler(RecipeHandler):
                     continue
 
                 if fn.startswith(dynload_dir + os.sep):
+                    if '/.debug/' in fn:
+                        continue
                     base = os.path.basename(fn)
                     provided = base.split('.', 1)[0]
                     packages[provided] = os.path.basename(pkgdatafile)