public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 4/9] recipetool: create: fix mapping python dependencies to python-dbg package
Date: Tue,  6 Sep 2016 22:03:25 +1200	[thread overview]
Message-ID: <4057cd1ba3160d517d101ffc8706967682731da9.1473155977.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1473155977.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1473155977.git.paul.eggleton@linux.intel.com>

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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index aff13cf..fb9806d 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -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)
-- 
2.5.5



  parent reply	other threads:[~2016-09-06 10:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 10:03 [PATCH 0/9] devtool / recipetool fixes Paul Eggleton
2016-09-06 10:03 ` [PATCH 1/9] lib/oe/patch: handle non-UTF8 encoding when reading patches Paul Eggleton
2016-09-06 15:50   ` Enrico Scholz
2016-09-06 20:16     ` Paul Eggleton
2016-09-07 10:07       ` Enrico Scholz
2016-09-06 10:03 ` [PATCH 2/9] devtool: update-recipe: support files with subdir= Paul Eggleton
2016-09-06 10:03 ` [PATCH 3/9] recipetool: create: AX_PKG_SWIG should add dependency on swig-native Paul Eggleton
2016-09-06 10:03 ` Paul Eggleton [this message]
2016-09-06 10:03 ` [PATCH 5/9] recipetool: create: support git submodules Paul Eggleton
2016-09-07  6:23   ` Ola x Nilsson
2016-09-07 21:07     ` Paul Eggleton
2016-09-06 10:03 ` [PATCH 6/9] recipetool: create: add --keep-temp command line option Paul Eggleton
2016-09-06 10:03 ` [PATCH 7/9] recipetool: create: allow license variable handling to be rerun Paul Eggleton
2016-09-06 10:03 ` [PATCH 8/9] recipetool: create: support node.js code outside of npm Paul Eggleton
2016-09-06 10:03 ` [PATCH 9/9] recipetool: create: avoid extra blank lines in output recipe Paul Eggleton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4057cd1ba3160d517d101ffc8706967682731da9.1473155977.git.paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox