summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-12 22:41:28 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-13 10:54:10 +0100
commit48f8d1201a0342ba5253c276df504fcb986b8245 (patch)
tree396f510bc3e2e863c516e09d0f22c6f199a03760 /scripts
parentbb8f141d0c2c668c4c98afe7760a3084756c92b9 (diff)
downloadpoky-48f8d1201a0342ba5253c276df504fcb986b8245.tar.gz
devtool: add: prevent repeatedly running recipetool
If recipetool returns with exit code 14 this means devtool needs to build nodejs-native and then call it again. If recipetool returns exit code 14 again then clearly something has gone wrong and we should just quit with an error. (From OE-Core rev: 8d7cced6e06d7c2037f5ab75ac859f501129532e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 73e629ca6f..1e84ae413f 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -155,11 +155,14 @@ def add(args, config, basepath, workspace):
155 155
156 tempdir = tempfile.mkdtemp(prefix='devtool') 156 tempdir = tempfile.mkdtemp(prefix='devtool')
157 try: 157 try:
158 builtnpm = False
158 while True: 159 while True:
159 try: 160 try:
160 stdout, _ = exec_build_env_command(config.init_path, basepath, 'recipetool --color=%s create --devtool -o %s \'%s\' %s' % (color, tempdir, source, extracmdopts), watch=True) 161 stdout, _ = exec_build_env_command(config.init_path, basepath, 'recipetool --color=%s create --devtool -o %s \'%s\' %s' % (color, tempdir, source, extracmdopts), watch=True)
161 except bb.process.ExecutionError as e: 162 except bb.process.ExecutionError as e:
162 if e.exitcode == 14: 163 if e.exitcode == 14:
164 if builtnpm:
165 raise DevtoolError('Re-running recipetool still failed to find npm')
163 # FIXME this is a horrible hack that is unfortunately 166 # FIXME this is a horrible hack that is unfortunately
164 # necessary due to the fact that we can't run bitbake from 167 # necessary due to the fact that we can't run bitbake from
165 # inside recipetool since recipetool keeps tinfoil active 168 # inside recipetool since recipetool keeps tinfoil active
@@ -167,6 +170,7 @@ def add(args, config, basepath, workspace):
167 # to exit out and come back here to do it. 170 # to exit out and come back here to do it.
168 ensure_npm(config, basepath, args.fixed_setup, check_exists=False) 171 ensure_npm(config, basepath, args.fixed_setup, check_exists=False)
169 logger.info('Re-running recipe creation process after building nodejs') 172 logger.info('Re-running recipe creation process after building nodejs')
173 builtnpm = True
170 continue 174 continue
171 elif e.exitcode == 15: 175 elif e.exitcode == 15:
172 raise DevtoolError('Could not auto-determine recipe name, please specify it on the command line') 176 raise DevtoolError('Could not auto-determine recipe name, please specify it on the command line')