Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 442846 - app-emulation/qemu - Do check for KVM option processor specific
Summary: app-emulation/qemu - Do check for KVM option processor specific
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-11-12 09:14 UTC by Justin Lecher (RETIRED)
Modified: 2012-11-12 09:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2012-11-12 09:14:53 UTC
I always an ERROR during pkg_pretend because the check is for AMD and INTEL KVM simultaniously.
Please find attach a patch to solve this issue
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2012-11-12 09:15:30 UTC
Index: qemu-1.2.0.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.2.0.ebuild,v
retrieving revision 1.8
diff -u -B -r1.8 qemu-1.2.0.ebuild
--- qemu-1.2.0.ebuild	5 Nov 2012 05:32:44 -0000	1.8
+++ qemu-1.2.0.ebuild	12 Nov 2012 09:15:14 -0000
@@ -156,7 +156,17 @@
 			ERROR_VHOST_NET+=" support"
 
 			if use amd64 || use x86 || use amd64-linux || use x86-linux; then
-				CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
+				if [[ -e /proc/cpuinfo ]]; then
+					if [[ $(grep -q -i intel /proc/cpuinfo ]]; then
+						CONFIG_CHECK+=" ~KVM_INTEL"
+					elif [[ $(grep -q -i amd /proc/cpuinfo ]]; then
+						CONFIG_CHECK+=" ~KVM_AMD"
+					else
+						CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
+					fi
+				else
+					CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
+				fi
 			fi
 
 			use python && CONFIG_CHECK+=" ~DEBUG_FS"
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2012-11-12 09:19:55 UTC
Of course the patch needs to be like this:

Index: qemu-1.2.0.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.2.0.ebuild,v
retrieving revision 1.8
diff -u -B -r1.8 qemu-1.2.0.ebuild
--- qemu-1.2.0.ebuild	5 Nov 2012 05:32:44 -0000	1.8
+++ qemu-1.2.0.ebuild	12 Nov 2012 09:19:39 -0000
@@ -156,7 +156,17 @@
 			ERROR_VHOST_NET+=" support"
 
 			if use amd64 || use x86 || use amd64-linux || use x86-linux; then
-				CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
+				if [[ -e /proc/cpuinfo ]]; then
+					if grep -q -i intel /proc/cpuinfo; then
+						CONFIG_CHECK+=" ~KVM_INTEL"
+					elif grep -q -i amd /proc/cpuinfo; then
+						CONFIG_CHECK+=" ~KVM_AMD"
+					else
+						CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
+					fi
+				else
+					CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
+				fi
 			fi
 
 			use python && CONFIG_CHECK+=" ~DEBUG_FS"
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2012-11-12 09:28:39 UTC
No. The check is the way it is due to people building binary packages.