Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11466 - Problem with all VM's.
Summary: Problem with all VM's.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All All
: Lowest critical (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 10697
  Show dependency tree
 
Reported: 2002-12-01 17:31 UTC by Adrian Almenar
Modified: 2011-10-30 22:20 UTC (History)
3 users (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 Adrian Almenar 2002-12-01 17:31:23 UTC
How to reproduce bugs: 
I emerged ibm-jdk-1.4.0 
and a java-config --list-available-vms returns: 
[sun-j2sdk-1.4.0] Sun JDK 1.4.0 (/etc/env.d/java/20sun-j2sdk-1.4.0) 
[ibm-jdk-1.4.0] IBM JDK 1.4.0 (/etc/env.d/java/20ibm-jdk-1.4.0) 
[sun-jdk-1.4.1.01] Sun JDK 1.4.1.01 (/etc/env.d/java/20sun-jdk-1.4.1.01) 
 
then i updated ibm-jdk-1.4.0 to ibm-jdk-1.4.0-r1 and restarted, and 
a java-config --list-available-vms returns: 
[sun-j2sdk-1.4.0] Sun JDK 1.4.0 (/etc/env.d/java/20sun-j2sdk-1.4.0) 
[sun-jdk-1.4.1.01] Sun JDK 1.4.1.01 (/etc/env.d/java/20sun-jdk-1.4.1.01) 
 
It doesnt list ibm-jdk 
 
How to fix it: 
emerge unmerge ibm-jdk 
emerge ibm-jdk (ibm-jdk-1.4.0-r1) and things get fixed. 
 
This bug is apparently on portage.
Comment 1 Adrian Almenar 2002-12-03 16:01:56 UTC
jrray, can you look at this bug ? 
Comment 2 Adrian Almenar 2002-12-03 16:02:42 UTC
[18:00:06] <Azarah> maybe add jrray to that bug as well 
[18:00:31] <Azarah> he said last time he found one or two possible places where it could 
corrupt memory, 
[18:00:40] <Azarah> but did not commit any fixes for those 
Comment 3 J Robert Ray 2002-12-04 10:14:53 UTC
I can tell you why the file gets deleted.  When the newer ebuild is merged, the
older ebuild is unmerged (with AUTOCLEAN on), or if you have AUTOCLEAN disabled
the file doesn't get deleted until you 'emerge clean'.

During the unmerge (clean), 'ebuild.sh postrm' is run.

java.eclass contains:

pkg_postrm() {
        java_rm_env ${VMHANDLE}
}

java_rm_env() {
        rm -f ${ROOT}/etc/env.d/java/20`basename $1` || die
}


The java eclass blindly deletes the env file during any unmerge whether the
package is being unmerged completely or if just an older version is being unmerged.

My recommendation is to remove that section from java.eclass.  The file in
question that is being deleted (/etc/env.d/java/20ibm-jdk-1.3.1) is created
during src_install() with set_java_env.  It gets created in the image directory
${D} and is later merged into the live filesystem by portage.  Portage will
track that file and delete it (or not delete it) as appropriate when the package
is later unmerged (or cleaned).

Caveat: it won't be deleted if it is common for users to modify this file.  But
I think this is definately the lesser of two evils.
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2002-12-09 06:33:05 UTC
This got fixed with jrray's sandbox updates, no?
Comment 5 Adrian Almenar 2002-12-09 10:10:49 UTC
Did jrray fix, and it worked well, so commiting it.