Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 343951 - qemu-kvm-0.13.0-r1 ebuild - incorrect variable declaration
Summary: qemu-kvm-0.13.0-r1 ebuild - incorrect variable declaration
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords: EBUILD
: 343981 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-03 07:47 UTC by Marko D
Modified: 2012-03-20 09:56 UTC (History)
2 users (show)

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


Attachments
patched ebuild for softmmu_targets variable declaration (qemu-kvm-0.13.0-r1-patched.ebuild,7.65 KB, text/plain)
2010-11-03 07:52 UTC, Marko D
Details
ebuild patch (qemu-kvm-0.13.0.ebuild.patch,830 bytes, text/plain)
2010-11-03 13:32 UTC, Marko D
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marko D 2010-11-03 07:47:59 UTC
The ebuild for qemu-kvm-0.13.0-r1 contains an incorrect variable declaration:
the function "src_configure" declares a local variable softmmu_targets. As a result the variable will be visible only inside the function src_configure. The function src_install will also try to access the same variable name. Because the variable was first declared as local, the src_install function will actually use a global variable with the same name "softmmu_targets". This global variable is empty when src_install is trying to use it. The entire "if block" in the src_install will not be executed and the ebuild will not install qemu-kvm and kvm symbolic links.
Suggested fix: declare softmmu_targets as a global variable and remove the local declaration form src_configure.
Comment 1 Marko D 2010-11-03 07:52:01 UTC
Created attachment 253015 [details]
patched ebuild for softmmu_targets variable declaration

Declare softmmu_targets as a global variable instead of local variable inside src_configure.
Comment 2 Albert W. Hopkins 2010-11-03 10:51:52 UTC
(In reply to comment #1)
> Created an attachment (id=253015) [details]
> patched ebuild for softmmu_targets variable declaration

Mark,

Can you please provide a patch file instead of the ebuild with the patch applied.  Thanks.
Comment 3 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-03 12:42:27 UTC
This mistake was introduced by me.
Comment 4 Marko D 2010-11-03 13:32:02 UTC
Created attachment 253037 [details]
ebuild patch
Comment 5 Albert W. Hopkins 2010-11-03 14:42:59 UTC
(In reply to comment #4)
> Created an attachment (id=253037) [details]
> ebuild patch

Thanks.. sorry actually I spoke too soon.  I was thinking you were patching an actual file inside the package and not the ebuild (even though I said ebuild).. but thanks anyway.  Shouldn't review bugs so early in the morning.

Comment 6 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-03 14:47:41 UTC
This was fixed on qemu-kvm-0.13.0-r2.
Comment 7 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-03 15:36:01 UTC
*** Bug 343981 has been marked as a duplicate of this bug. ***
Comment 8 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-03 15:41:08 UTC
(In reply to comment #4)
> Created an attachment (id=253037) [details]
> ebuild patch

Thanks for the patch.
In the future, please generate patches with diff -urN <old> <new>.
Comment 9 Marko D 2010-11-03 15:54:48 UTC
Thanks for diff hint. I'll keep that in mind next time.