From 182dc05c154958a21d3e78652c57b15994f22cba Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Fri, 10 Jan 2020 17:10:08 -0800 Subject: [PATCH] Remove unresolvable names from buildreq_cache The buildreq cache should only contain names/symbols/etc that are resolvable at build time. The names may indicate missing packages, but they may also be invalid, so it is best to avoid adding the names to the cache in the first place. Fixes #480 Signed-off-by: Patrick McCarty --- autospec/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autospec/build.py b/autospec/build.py index 2b8406d0..87c4677a 100644 --- a/autospec/build.py +++ b/autospec/build.py @@ -191,7 +191,10 @@ def parse_buildroot_log(filename, returncode): for line in loglines: match = missing_pat.match(line) if match is not None: - util.print_fatal("Cannot resolve dependency name: {}".format(match.group(1))) + name = match.group(1) + util.print_fatal("Cannot resolve dependency name: {}".format(name)) + # Avoid adding the dependency name to the buildreq cache + buildreq.remove_buildreq(name) is_clean = False return is_clean