From 8455e3d7ca06c337cc3eb437a69108f61f58877f Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Tue, 3 Dec 2019 17:38:59 +0000 Subject: [PATCH] - Upstream bug fix (bsc#1027942) 29f9f5f2-virt-xml-fix-defined_xml_is_unchanged.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=495 --- ...irt-xml-fix-defined_xml_is_unchanged.patch | 27 +++++++++++++++++++ virt-manager.changes | 2 ++ virt-manager.spec | 4 ++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 29f9f5f2-virt-xml-fix-defined_xml_is_unchanged.patch diff --git a/29f9f5f2-virt-xml-fix-defined_xml_is_unchanged.patch b/29f9f5f2-virt-xml-fix-defined_xml_is_unchanged.patch new file mode 100644 index 00000000..7e4889b1 --- /dev/null +++ b/29f9f5f2-virt-xml-fix-defined_xml_is_unchanged.patch @@ -0,0 +1,27 @@ +Subject: virt-xml: fix defined_xml_is_unchanged +From: Pavel Hrdina phrdina@redhat.com Tue Dec 3 13:02:21 2019 +0100 +Date: Tue Dec 3 13:04:37 2019 +0100: +Git: 29f9f5f2d7f47fe6cc3333f2a9e6c6209db5a8f3 + +Commit <53f075ab76e1c372474ae0d88f202e487d9f213f> added a warning if the +VM XML is not changed after removing default devices but the code was +incorrect. We have to compare strings instead of string vs Guest object +and also the condition was inverted. + +Signed-off-by: Pavel Hrdina + +diff --git a/virt-xml b/virt-xml +index 71445c9f..7b0174c9 100755 +--- a/virt-xml ++++ b/virt-xml +@@ -105,8 +105,8 @@ def get_domain_and_guest(conn, domstr): + + def defined_xml_is_unchanged(conn, domain, original_xml): + rawxml = get_xmldesc(domain, inactive=True) +- new_xml = virtinst.Guest(conn, parsexml=rawxml) +- return new_xml != original_xml ++ new_xml = virtinst.Guest(conn, parsexml=rawxml).get_xml() ++ return new_xml == original_xml + + + ################ diff --git a/virt-manager.changes b/virt-manager.changes index 8a451bea..7a15be28 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -7,6 +7,8 @@ Mon Dec 2 14:03:00 MST 2019 - carnold@suse.com - bsc#1158227 - virt-manager: Fix duplicate entries in the operating system URL drop down menu virtman-show-suse-install-repos.patch +- Upstream bug fix (bsc#1027942) + 29f9f5f2-virt-xml-fix-defined_xml_is_unchanged.patch - Drop virtman-default-to-xen-pv.patch - Refreshed virtinst-add-pvh-support.patch diff --git a/virt-manager.spec b/virt-manager.spec index bb8e25a5..7d2390e6 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -46,6 +46,7 @@ Patch11: 8f4c53ea-video-Prefer-bochs-when-its-supported..patch Patch12: ae19d6d6-fix-resizing-of-spice-clients-with-guest-resizing-enabled.patch Patch13: 51d84c54-connection-Avoid-repeated-default-pool-creation-attempts.patch Patch14: d934d6f2-domcaps-Fix-check-for-uncached-security-features.patch +Patch15: 29f9f5f2-virt-xml-fix-defined_xml_is_unchanged.patch # SUSE Only Patch70: virtman-desktop.patch Patch71: virtman-kvm.patch @@ -191,6 +192,7 @@ machine). %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 # SUSE Only %patch70 -p1 %patch71 -p1