summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-10-31 14:24:42 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-11 12:14:27 +0000
commit541b7e2ce043524d2310fd642dbce4daa70f8457 (patch)
tree9588f0f107f4f02452a73b0db95a130276b973ec /scripts
parent46a3662d4e441b8c6148b00096faeb93ab5447a9 (diff)
downloadpoky-541b7e2ce043524d2310fd642dbce4daa70f8457.tar.gz
devtool: show a better error message if meta-files aren't found
If the files that the devtool-source class is supposed to create in the source tree aren't found in the temporary directory then we know that the class hasn't worked properly - say that explicitly. (From OE-Core rev: 4621152509c037532b133e5e6d5b73bda7ddb602) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 5ac678b3b1..1e7d707d68 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -544,11 +544,14 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
544 if not res: 544 if not res:
545 raise DevtoolError('Extracting source for %s failed' % pn) 545 raise DevtoolError('Extracting source for %s failed' % pn)
546 546
547 with open(os.path.join(tempdir, 'initial_rev'), 'r') as f: 547 try:
548 initial_rev = f.read() 548 with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
549 initial_rev = f.read()
549 550
550 with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f: 551 with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
551 srcsubdir = f.read() 552 srcsubdir = f.read()
553 except FileNotFoundError as e:
554 raise DevtoolError('Something went wrong with source extraction - the devtool-source class was not active or did not function correctly:\n%s' % str(e))
552 srcsubdir_rel = os.path.relpath(srcsubdir, os.path.join(tempdir, 'workdir')) 555 srcsubdir_rel = os.path.relpath(srcsubdir, os.path.join(tempdir, 'workdir'))
553 556
554 tempdir_localdir = os.path.join(tempdir, 'oe-local-files') 557 tempdir_localdir = os.path.join(tempdir, 'oe-local-files')