We ignore subimages if we're reusing the previous config so let's
make sure we ignore subimages as well after running configure scripts
if we're reusing previous config.
Fixes #3238
Vmm,
cat_config,
format_bytes,
+ have_history,
parse_boolean,
parse_config,
resolve_deps,
# The images array has been modified so we need to reevaluate last again.
# Also ensure that all other images are reordered in case their dependencies were modified.
last = images[-1]
- images = resolve_deps(images[:-1], last.dependencies) + [last]
+
+ if not have_history(args):
+ images = resolve_deps(images[:-1], last.dependencies) + [last]
if not (last.output_dir_or_cwd() / last.output).exists() or last.output_format == OutputFormat.none:
for config in images:
return True
+def have_history(args: Args) -> bool:
+ return (
+ args.verb.needs_build()
+ and args.verb != Verb.build
+ and not args.force
+ and Path(".mkosi-private/history/latest.json").exists()
+ )
+
+
def parse_config(
argv: Sequence[str] = (),
*,
if not args.verb.needs_config():
return args, ()
- if (
- args.verb.needs_build()
- and args.verb != Verb.build
- and not args.force
- and Path(".mkosi-private/history/latest.json").exists()
- ):
+ if have_history(args):
try:
prev = Config.from_json(Path(".mkosi-private/history/latest.json").read_text())
except ValueError: