]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: create: fix npm license code regression
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 23 Aug 2017 12:14:48 +0000 (00:14 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Aug 2017 12:47:49 +0000 (13:47 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create_npm.py

index 6252e915b5a03d6e13c8a5f8d88fb04dab352c50..ae5397262e82f6a26a6a0d237fbecc854fcfc724 100644 (file)
@@ -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 = {}