From: Jiri Denemark Date: Mon, 21 Oct 2024 10:55:32 +0000 (+0200) Subject: sync_qemu_models_i386: Do not overwrite existing models X-Git-Tag: v10.10.0-rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=233afc3c585be462156d384f0c6b9dd33c1fa2c8;p=thirdparty%2Flibvirt.git sync_qemu_models_i386: Do not overwrite existing models We don't change definitions of CPU models which were already included in a libvirt release to maintain migration compatibility. Thus the script can just skip existing models and save us from having to drop the changes it would do to them. Signed-off-by: Jiri Denemark Reviewed-by: Daniel P. Berrangé --- diff --git a/src/cpu_map/sync_qemu_models_i386.py b/src/cpu_map/sync_qemu_models_i386.py index 78c2bffab2..f7b06a7716 100755 --- a/src/cpu_map/sync_qemu_models_i386.py +++ b/src/cpu_map/sync_qemu_models_i386.py @@ -535,6 +535,10 @@ def main(): for model in models: name = os.path.join(args.outdir, f"x86_{model['name']}.xml") + if os.path.isfile(name): + # Ignore existing models as CPU models in libvirt should never + # change once released. + continue with open(name, "wt") as f: output_model(f, model)