]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
sync_qemu_models_i386: Do not overwrite existing models
authorJiri Denemark <jdenemar@redhat.com>
Mon, 21 Oct 2024 10:55:32 +0000 (12:55 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 26 Nov 2024 12:04:33 +0000 (13:04 +0100)
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 <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/cpu_map/sync_qemu_models_i386.py

index 78c2bffab2f1760daa0321aa3a46815c34453e0a..f7b06a771643d8b8f5adcee88f8b778510812860 100755 (executable)
@@ -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)