diff options
-rw-r--r-- | scripts/lib/recipetool/create_npm.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py index 579b7ae48a..2bcae91dfa 100644 --- a/scripts/lib/recipetool/create_npm.py +++ b/scripts/lib/recipetool/create_npm.py | |||
@@ -204,6 +204,9 @@ class NpmRecipeHandler(RecipeHandler): | |||
204 | self._run_npm_install(d, srctree, registry, dev) | 204 | self._run_npm_install(d, srctree, registry, dev) |
205 | shrinkwrap_file = self._generate_shrinkwrap(d, srctree, dev) | 205 | shrinkwrap_file = self._generate_shrinkwrap(d, srctree, dev) |
206 | 206 | ||
207 | with open(shrinkwrap_file, "r") as f: | ||
208 | shrinkwrap = json.load(f) | ||
209 | |||
207 | if os.path.exists(lock_copy): | 210 | if os.path.exists(lock_copy): |
208 | bb.utils.movefile(lock_copy, lock_file) | 211 | bb.utils.movefile(lock_copy, lock_file) |
209 | 212 | ||
@@ -226,7 +229,8 @@ class NpmRecipeHandler(RecipeHandler): | |||
226 | value = origvalue.replace("version=" + data["version"], "version=${PV}") | 229 | value = origvalue.replace("version=" + data["version"], "version=${PV}") |
227 | value = value.replace("version=latest", "version=${PV}") | 230 | value = value.replace("version=latest", "version=${PV}") |
228 | values = [line.strip() for line in value.strip('\n').splitlines()] | 231 | values = [line.strip() for line in value.strip('\n').splitlines()] |
229 | values.append(url_recipe) | 232 | if "dependencies" in shrinkwrap: |
233 | values.append(url_recipe) | ||
230 | return values, None, 4, False | 234 | return values, None, 4, False |
231 | 235 | ||
232 | (_, newlines) = bb.utils.edit_metadata(lines_before, ["SRC_URI"], _handle_srcuri) | 236 | (_, newlines) = bb.utils.edit_metadata(lines_before, ["SRC_URI"], _handle_srcuri) |