Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 172337 - vmware-mod.eclass does not initialize BUILD_TARGETS properly
Summary: vmware-mod.eclass does not initialize BUILD_TARGETS properly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo VMWare Bug Squashers [disabled]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-26 20:21 UTC by Georgi Georgiev
Modified: 2007-04-09 17:10 UTC (History)
0 users

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


Attachments
vmware-mod-pkgsetup.patch (patch.txt,582 bytes, patch)
2007-03-26 20:23 UTC, Georgi Georgiev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Georgi Georgiev 2007-03-26 20:21:57 UTC
I was unable to compile vmware-modules (any version) with paludis. The problem is that vmware-mod.eclass initialized $BUILD_TARGETS in global scope, but the referenced $KV_OUT_DIR is only set after linux-mod_pkg_setup() is called.

Moving the initialization of BUILD_TARGETS inside vmware-mod_pkg_setup() solves the problem.

--- vmware-mod.eclass   2007-03-27 05:07:13.000000000 +0900
+++ /usr/portage/eclass/vmware-mod.eclass       2007-03-27 00:05:44.000000000 +0900
@@ -28,10 +28,10 @@
 EXPORT_FUNCTIONS pkg_setup src_unpack src_install
 
 # Must define VMWARE_VER to make, otherwise it'll try and run getversion.pl
+BUILD_TARGETS="auto-build VMWARE_VER=${VMWARE_VER} KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
 
 vmware-mod_pkg_setup() {
        linux-mod_pkg_setup
-       BUILD_TARGETS="auto-build VMWARE_VER=${VMWARE_VER} KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
 
        vmware_determine_product
Comment 1 Georgi Georgiev 2007-03-26 20:23:24 UTC
Created attachment 114542 [details, diff]
vmware-mod-pkgsetup.patch

Here is a proper patch (the pasted code in the report was actually a reversed patch).
Comment 2 Mike Auty (RETIRED) gentoo-dev 2007-03-26 22:36:26 UTC
Hiya Georgi,

Thanks for the patch, I've made the changes in the overlay and I'm going to keep them in there a few days for testing, after which I'll push the changes out to the main tree.  Please try out the overlay and let me know if there are any further problems.  Thanks again for the report...  5:)
Comment 3 Georgi Georgiev 2007-03-28 10:00:33 UTC
(In reply to comment #2)
> Hiya Georgi,
> 
> Thanks for the patch, I've made the changes in the overlay and I'm going to
> keep them in there a few days for testing, after which I'll push the changes
> out to the main tree.  Please try out the overlay and let me know if there are
> any further problems.  Thanks again for the report...  5:)

I looked at the vmware overlay. I diffed it against mine, and it appears that the files in question are identical to what I have in my own overlay, so the stable versions should be OK.

Some of the files (in some other packages), however, are older than what is even in the official tree, so I think I'll pass on testing the overlay for now.
Comment 4 Mike Auty (RETIRED) gentoo-dev 2007-04-09 17:10:18 UTC
Ok, I just updated the eclass in the main tree, so please give that a go (in a couple of hours after the servers have resynced) and let me know if there are any problems.  I'm going to mark the bug as fixed, but if you encounter any problems, do please reopen it and we'll try to fix them up.  Thanks again for your help!  5:)