Commit c172cce9 authored by Thomas Haemmerle's avatar Thomas Haemmerle Committed by Stefano Babic
Browse files

Fix error message in automatic versions



Assign variable before checking and print a more useful error message if
none of the files in `list_for_cpio` can be found in group.
Signed-off-by: default avatarThomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
parent a233ac5c
......@@ -98,6 +98,8 @@ def swupdate_expand_auto_versions(d, s, list_for_cpio):
data = f.read()
def get_package_name(group, file_list):
package = None
m = re.search(r"%s:(?P<package>.+?(?=\"))" % (AUTOVERSION_REGEXP), group)
if m:
package = m.group('package')
......@@ -108,7 +110,7 @@ def swupdate_expand_auto_versions(d, s, list_for_cpio):
package = filename
if not package:
bb.fatal("Failed to find %s in group with \"%s\"" % (filename, AUTO_VERSION_TAG))
bb.fatal("Failed to find file in group %s" % (group))
return (package, False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment