Automagic: Ensure progress percentages complete

This commit is contained in:
Mike Auty
2020-10-31 23:32:17 +00:00
parent 47ff37b07b
commit 46f6ee2eae
4 changed files with 12 additions and 0 deletions
@@ -60,4 +60,8 @@ class ConstructionMagic(interfaces.automagic.AutomagicInterface):
elif isinstance(requirement, interfaces.configuration.ConstructableRequirementInterface):
# We know all the subrequirements are filled, so let's populate
requirement.construct(context, config_path)
if progress_callback is not None:
progress_callback(100, "Reconstruction finished")
return []
@@ -300,3 +300,6 @@ class KernelPDBScanner(interfaces.automagic.AutomagicInterface):
if valid_kernel:
self.recurse_symbol_fulfiller(context, valid_kernel, progress_callback)
self.set_kernel_virtual_offset(context, valid_kernel)
if progress_callback is not None:
progress_callback(100, "PDB scanning finished")
@@ -66,6 +66,8 @@ class LayerStacker(interfaces.automagic.AutomagicInterface):
# Search for suitable requirements
self.stack(context, config_path, requirement, progress_callback)
if progress_callback is not None:
progress_callback(100, "Stacking attempts finished")
return None
def stack(self, context: interfaces.context.ContextInterface, config_path: str,
@@ -122,3 +122,6 @@ class SymbolBannerCache(interfaces.automagic.AutomagicInterface):
# Rewrite the cached banners each run, since writing is faster than the banner_cache validation portion
self.save_banners(banners)
if progress_callback is not None:
progress_callback(100, "Built {} caches".format(self.os))