mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00
oe-setup-build: raise exceptions on errors
Otherwise the tool simply prints what went wrong and exits without error, which makes it impossible for tools like bitbake-setup to determine that the requested operation did not succeed. (From OE-Core rev: d44ab1c3abb25ef08307558430d76a47cde07cc1) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
2fded92cc5
commit
1db6f52e72
|
@ -18,8 +18,7 @@ def makebuildpath(topdir, template):
|
|||
|
||||
def discover_templates(layers_file):
|
||||
if not os.path.exists(layers_file):
|
||||
print("List of layers {} does not exist; were the layers set up using the setup-layers script?".format(layers_file))
|
||||
return None
|
||||
raise Exception("List of layers {} does not exist; were the layers set up using the setup-layers script or bitbake-setup tool?".format(layers_file))
|
||||
|
||||
templates = []
|
||||
layers_list = json.load(open(layers_file))["layers"]
|
||||
|
@ -77,8 +76,7 @@ def find_template(template_name, templates):
|
|||
for t in templates:
|
||||
if t["templatename"] == template_name:
|
||||
return t
|
||||
print("Configuration {} is not one of {}, please try again.".format(template_name, [t["templatename"] for t in templates]))
|
||||
return None
|
||||
raise Exception("Configuration {} is not one of {}, please try again.".format(template_name, [t["templatename"] for t in templates]))
|
||||
|
||||
def setup_build_env(args):
|
||||
templates = discover_templates(args.layerlist)
|
||||
|
|
Loading…
Reference in New Issue
Block a user