Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 611036 - java-utils-2.eclass searches for build VM in ROOT
Summary: java-utils-2.eclass searches for build VM in ROOT
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-26 20:17 UTC by William Throwe
Modified: 2021-03-25 16:43 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 William Throwe 2017-02-26 20:17:32 UTC
The eclass calls java-config-2 in many places to get build information.  java-config-2 respects the ROOT environment variable, which is set by portage, so the calls that are looking for things like the active VM fail.  The calls should probably just explicitly set ROOT to / or EPREFIX or something.

 * Package:    dev-java/icedtea-3.3.0
 * Repository: gentoo
 * Maintainer: gnu_andrew@member.fsf.org chewi@gentoo.org,java@gentoo.org,proxy-maint@gentoo.org
 * USE:        abi_x86_64 alsa amd64 cups elibc_glibc gtk jbootstrap kernel_linux pch source sunec userland_GNU webstart
 * FEATURES:   compressdebug preserve-libs sandbox splitdebug userpriv usersandbox
 * Checking for at least 8500 MiB disk space at "/var/tmp/portage/dev-java/icedtea-3.3.0/temp" ...
 [ ok ]
 * java-pkg_build-vm-from-handle: No vm found for handles: 
 *              icedtea-8 icedtea-bin-8
 *              icedtea-7 icedtea-bin-7
 * java-pkg_switch-vm: No VM found for handles: 
 *              icedtea-8 icedtea-bin-8
 *              icedtea-7 icedtea-bin-7
 * ERROR: dev-java/icedtea-3.3.0::gentoo failed (setup phase):
 *   java-pkg_switch-vm: Failed to determine VM for building
Comment 1 William Throwe 2017-02-26 21:06:23 UTC
Also, while it wouldn't fix this bug, shouldn't these checks be done in a src_* phase?  A build VM shouldn't be required for a binary package install.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2017-02-27 18:58:59 UTC
(In reply to William Throwe from comment #1)
> Also, while it wouldn't fix this bug, shouldn't these checks be done in a
> src_* phase?  A build VM shouldn't be required for a binary package install.

When "${EAPI}" not in ("0", "1", "2", "3"), the following check can be used in eclass:

if [[ "${MERGE_TYPE}" != "binary" ]]; then


(And doing these checks also in pkg_pretend() would be better.)