diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
commit | c0f2890c01882e9ea14e781c044f3a84f75bd0fc (patch) | |
tree | 0962d17b0bf752ba4c009fb624f044b89fd6fd87 /scripts/lib/recipetool/create_npm.py | |
parent | c4e2c59088765d1f1de7ec57cde91980f887c2ff (diff) | |
download | poky-c0f2890c01882e9ea14e781c044f3a84f75bd0fc.tar.gz |
scripts: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.
Search made with the following regex: getVar ?\(( ?[^,()]*), True\)
(From OE-Core rev: 0a36bd96e6b29fd99a296efc358ca3e9fb5af735)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/create_npm.py')
-rw-r--r-- | scripts/lib/recipetool/create_npm.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py index 7bb844cb0c..888aa2b00a 100644 --- a/scripts/lib/recipetool/create_npm.py +++ b/scripts/lib/recipetool/create_npm.py | |||
@@ -49,7 +49,7 @@ class NpmRecipeHandler(RecipeHandler): | |||
49 | 49 | ||
50 | def _shrinkwrap(self, srctree, localfilesdir, extravalues, lines_before): | 50 | def _shrinkwrap(self, srctree, localfilesdir, extravalues, lines_before): |
51 | try: | 51 | try: |
52 | runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH', True)) | 52 | runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH')) |
53 | bb.process.run('npm shrinkwrap', cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) | 53 | bb.process.run('npm shrinkwrap', cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) |
54 | except bb.process.ExecutionError as e: | 54 | except bb.process.ExecutionError as e: |
55 | logger.warn('npm shrinkwrap failed:\n%s' % e.stdout) | 55 | logger.warn('npm shrinkwrap failed:\n%s' % e.stdout) |
@@ -62,7 +62,7 @@ class NpmRecipeHandler(RecipeHandler): | |||
62 | lines_before.append('NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json"') | 62 | lines_before.append('NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json"') |
63 | 63 | ||
64 | def _lockdown(self, srctree, localfilesdir, extravalues, lines_before): | 64 | def _lockdown(self, srctree, localfilesdir, extravalues, lines_before): |
65 | runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH', True)) | 65 | runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH')) |
66 | if not NpmRecipeHandler.lockdownpath: | 66 | if not NpmRecipeHandler.lockdownpath: |
67 | NpmRecipeHandler.lockdownpath = tempfile.mkdtemp('recipetool-npm-lockdown') | 67 | NpmRecipeHandler.lockdownpath = tempfile.mkdtemp('recipetool-npm-lockdown') |
68 | bb.process.run('npm install lockdown --prefix %s' % NpmRecipeHandler.lockdownpath, | 68 | bb.process.run('npm install lockdown --prefix %s' % NpmRecipeHandler.lockdownpath, |
@@ -257,7 +257,7 @@ class NpmRecipeHandler(RecipeHandler): | |||
257 | if version != '*' and not '/' in version: | 257 | if version != '*' and not '/' in version: |
258 | pkgfullname += "@'%s'" % version | 258 | pkgfullname += "@'%s'" % version |
259 | logger.debug(2, "Calling getdeps on %s" % pkg) | 259 | logger.debug(2, "Calling getdeps on %s" % pkg) |
260 | runenv = dict(os.environ, PATH=d.getVar('PATH', True)) | 260 | runenv = dict(os.environ, PATH=d.getVar('PATH')) |
261 | fetchcmd = "npm view %s --json" % pkgfullname | 261 | fetchcmd = "npm view %s --json" % pkgfullname |
262 | output, _ = bb.process.run(fetchcmd, stderr=subprocess.STDOUT, env=runenv, shell=True) | 262 | output, _ = bb.process.run(fetchcmd, stderr=subprocess.STDOUT, env=runenv, shell=True) |
263 | data = self._parse_view(output) | 263 | data = self._parse_view(output) |