diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2006-11-15 23:20:29 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2006-11-15 23:20:29 +0000 |
commit | b5a2bec2d68db936f53f77ba00a96e28e18b857b (patch) | |
tree | 926103e6a3dbc14b7acf263ca49bcd17876e84ea /bin | |
parent | d5074e451a68a702cec762e7f9f914a6c5b90db0 (diff) | |
download | bitbake-b5a2bec2d68db936f53f77ba00a96e28e18b857b.tar.gz |
bin/bitbake: Improve -b error message
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bitbake | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/bitbake b/bin/bitbake index 9413d7002..403f7b8ad 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -539,13 +539,17 @@ class BBCooker: except OSError: (filelist, masked) = self.collect_bbfiles() regexp = re.compile(self.configuration.buildfile) - matches = 0 + matches = [] for f in filelist: - if regexp.search(f): + if regexp.search(f) and os.path.isfile(f): bf = f - matches = matches + 1 - if matches != 1: - bb.msg.fatal(bb.msg.domain.Parsing, "Unable to match %s (%s matches found)" % (self.configuration.buildfile, matches)) + matches.append(f) + if len(matches) != 1: + bb.msg.error(bb.msg.domain.Parsing, "Unable to match %s (%s matches found):" % (self.configuration.buildfile, len(matches))) + for f in matches: + bb.msg.error(bb.msg.domain.Parsing, " %s" % f) + sys.exit(1) + bf = matches[0] bbfile_data = bb.parse.handle(bf, self.configuration.data) |