diff options
author | William Salmon <will.salmon@codethink.co.uk> | 2018-08-14 09:57:42 +0100 |
---|---|---|
committer | William Salmon <will.salmon@codethink.co.uk> | 2018-08-17 10:28:44 +0100 |
commit | 22b6fa21074650413a220ace7e68c8135e279142 (patch) | |
tree | e70e603c96701a14d9a9de47e86866a66061bcde | |
parent | 27220c693dc00de29a787d531b28c64d9f7e2bbb (diff) | |
download | buildstream-willsalmon/580-backport.tar.gz |
Improve error message for build if there are refs missingwillsalmon/580-backport
-rw-r--r-- | buildstream/_pipeline.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py index b74c7c302..2d3194f6b 100644 --- a/buildstream/_pipeline.py +++ b/buildstream/_pipeline.py @@ -358,10 +358,15 @@ class Pipeline(): inconsistent.append(element) if inconsistent: - detail = "Exact versions are missing for the following elements\n" + \ - "Try tracking these elements first with `bst track`\n\n" + detail = "Exact versions are missing for the following elements:\n\n" for element in inconsistent: - detail += " " + element._get_full_name() + "\n" + detail += " Element: {} is inconsistent\n".format(element._get_full_name()) + for source in element.sources(): + if source._get_consistency() == Consistency.INCONSISTENT: + detail += " Source {} is missing ref\n".format(source) + detail += '\n' + detail += "Try tracking these elements first with `bst track`\n" + raise PipelineError("Inconsistent pipeline", detail=detail, reason="inconsistent-pipeline") ############################################################# |