All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] recipetool npm regression fixes
@ 2017-08-23 12:14 Paul Eggleton
  2017-08-23 12:14 ` [PATCH 1/2] recipetool: create: fix broken import in npm module Paul Eggleton
  2017-08-23 12:14 ` [PATCH 2/2] recipetool: create: fix npm license code regression Paul Eggleton
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Eggleton @ 2017-08-23 12:14 UTC (permalink / raw)
  To: openembedded-core

Fixes for a couple of regressions caused by recent patches to
recipetool.


The following changes since commit f59e729f98ef9b506b0cfdc415567e03ec87f2a9:

  runqemu: Use virtio to mount cdrom drives (2017-08-23 12:06:46 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/recipetool-npm-fixes2
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/recipetool-npm-fixes2

Paul Eggleton (2):
  recipetool: create: fix broken import in npm module
  recipetool: create: fix npm license code regression

 scripts/lib/recipetool/create_npm.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.9.5



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] recipetool: create: fix broken import in npm module
  2017-08-23 12:14 [PATCH 0/2] recipetool npm regression fixes Paul Eggleton
@ 2017-08-23 12:14 ` Paul Eggleton
  2017-08-23 12:14 ` [PATCH 2/2] recipetool: create: fix npm license code regression Paul Eggleton
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2017-08-23 12:14 UTC (permalink / raw)
  To: openembedded-core

With "import oe" in create_npm.py you get "AttributeError: module 'oe'
has no attribute 'package'" when it tries to call
oe.package.npm_split_package_dirs().

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/lib/recipetool/create_npm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py
index 07fcf4d..6252e91 100644
--- a/scripts/lib/recipetool/create_npm.py
+++ b/scripts/lib/recipetool/create_npm.py
@@ -166,7 +166,7 @@ class NpmRecipeHandler(RecipeHandler):
 
     def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
         import bb.utils
-        import oe
+        import oe.package
         from collections import OrderedDict
 
         if 'buildsystem' in handled:
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] recipetool: create: fix npm license code regression
  2017-08-23 12:14 [PATCH 0/2] recipetool npm regression fixes Paul Eggleton
  2017-08-23 12:14 ` [PATCH 1/2] recipetool: create: fix broken import in npm module Paul Eggleton
@ 2017-08-23 12:14 ` Paul Eggleton
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2017-08-23 12:14 UTC (permalink / raw)
  To: openembedded-core

OE-Core commit 1df60b09f7a60427795ec828c9c7180e4e52f98c caused a
regression in npm handling since it still expected to be able to get the
results of the license handling, but this no longer happens until after
the npm plugin is called. Thus, call the license handling function
ourselves here (which will record this as having been handled so it
doesn't get done again later).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/lib/recipetool/create_npm.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py
index 6252e91..ae53972 100644
--- a/scripts/lib/recipetool/create_npm.py
+++ b/scripts/lib/recipetool/create_npm.py
@@ -208,11 +208,14 @@ class NpmRecipeHandler(RecipeHandler):
 
                 # Split each npm module out to is own package
                 npmpackages = oe.package.npm_split_package_dirs(srctree)
+                licvalues = None
                 for item in handled:
                     if isinstance(item, tuple):
                         if item[0] == 'license':
                             licvalues = item[1]
                             break
+                if not licvalues:
+                    licvalues = handle_license_vars(srctree, lines_before, handled, extravalues, d)
                 if licvalues:
                     # Augment the license list with information we have in the packages
                     licenses = {}
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-23 12:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 12:14 [PATCH 0/2] recipetool npm regression fixes Paul Eggleton
2017-08-23 12:14 ` [PATCH 1/2] recipetool: create: fix broken import in npm module Paul Eggleton
2017-08-23 12:14 ` [PATCH 2/2] recipetool: create: fix npm license code regression Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.