rpms/libvirt/devel libvirt-qemu-machine-type-fixes2.patch, NONE, 1.1 libvirt.spec, 1.193, 1.194

Mark McLoughlin markmc at fedoraproject.org
Thu Oct 29 10:57:55 UTC 2009


Author: markmc

Update of /cvs/pkgs/rpms/libvirt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12724

Modified Files:
	libvirt.spec 
Added Files:
	libvirt-qemu-machine-type-fixes2.patch 
Log Message:
* Thu Oct 29 2009 Mark McLoughlin <markmc at redhat.com> - 0.7.2-2
- Fix qemu machine types handling


libvirt-qemu-machine-type-fixes2.patch:
 qemu_conf.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE libvirt-qemu-machine-type-fixes2.patch ---
>From b7b6a28eb9eae641762de9408a90971d849ce92e Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc at redhat.com>
Date: Thu, 15 Oct 2009 12:09:17 +0100
Subject: [PATCH] Don't copy old machines from a domain which has none

If the the qemu and kvm binaries are the same, we don't include machine
types in the kvm domain info.

However, the code which refreshes the machine types info from the
previous capabilities structure first looks at the kvm domain's info,
finds it matches and then copies the empty machine types list over
for the top-level qemu domain.

That doesn't make sense, we shouldn't copy an empty machin types list.

* src/qemu/qemu_conf.c: qemudGetOldMachinesFromInfo(): don't copy an
  empty machine types list.

(cherry picked from commit 2210f8a3a8e2774ca4fb8b42e21899e5b85ca913)

Fedora-patch: libvirt-qemu-machine-type-fixes2.patch
---
 src/qemu/qemu_conf.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index ac63570..b881f1e 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -505,6 +505,9 @@ qemudGetOldMachinesFromInfo(virCapsGuestDomainInfoPtr info,
     virCapsGuestMachinePtr *list;
     int i;
 
+    if (!info->nmachines)
+        return 0;
+
     if (!info->emulator || !STREQ(emulator, info->emulator))
         return 0;
 
-- 
1.6.2.5



Index: libvirt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt/devel/libvirt.spec,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -p -r1.193 -r1.194
--- libvirt.spec	29 Oct 2009 10:15:23 -0000	1.193
+++ libvirt.spec	29 Oct 2009 10:57:55 -0000	1.194
@@ -155,6 +155,10 @@ Release: 2%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
 Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz
+
+# Fix qemu machine types handling
+Patch01: libvirt-qemu-machine-type-fixes2.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 URL: http://libvirt.org/
 BuildRequires: python-devel
@@ -367,6 +371,8 @@ of recent versions of Linux (and other O
 %prep
 %setup -q
 
+%patch01 -p1
+
 %build
 %if ! %{with_xen}
 %define _without_xen --without-xen
@@ -780,6 +786,7 @@ fi
 %changelog
 * Thu Oct 29 2009 Mark McLoughlin <markmc at redhat.com> - 0.7.2-2
 - Make libvirt-devel require libvirt-client, not libvirt
+- Fix qemu machine types handling
 
 * Wed Oct 14 2009 Daniel Veillard <veillard at redhat.com> - 0.7.2-1
 - Upstream release of 0.7.2




More information about the scm-commits mailing list