Bug 648260

Summary: update-alternatives: error: alternative pack200 can't be slave of java: it is a slave of javac
Product: [openSUSE] openSUSE 11.4 Reporter: Michal Vyskocil <mvyskocil>
Component: BasesystemAssignee: Michal Vyskocil <mvyskocil>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P2 - High    
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on: 642531    
Bug Blocks:    

Description Michal Vyskocil 2010-10-21 07:54:06 UTC
update-alternative 1.15.8.5 does not allow having the same slave for two alternatives, which is unfortunately the case of java-1_6_0-openjdk. It has pack200* slaves for java, even other JVM has it in javac. It causes an error after installation

# java-1_6_0-sun-devel is already installed
$ zypper in java-1_6_0-openjdk
Installing: java-1_6_0-openjdk-1.6.0.0_b18-1.29 [done]
Additional rpm output:
update-alternatives: error: alternative pack200 can't be slave of java: it is a slave of javac
update-alternatives: using /usr/lib64/jvm/jre-1.6.0-openjdk to provide /usr/lib64/jvm/jre-openjdk (jre_openjdk) in auto mode.
update-alternatives: using /usr/lib64/jvm/jre-1.6.0-openjdk to provide /usr/lib64/jvm/jre-1.6.0 (jre_1.6.0) in auto mode
Comment 1 Michal Vyskocil 2010-10-21 07:57:08 UTC
Because no java symlink is created, openjdk does not work out of the box after installation.

The fix is easy - call sed -i '/pack200/d/' /var/lib/rpm/alternatives/java before update-alternatives --install java call and move pack200 slaves to javac in openjdk package.
Comment 2 Michal Vyskocil 2011-02-15 09:30:40 UTC
Already fixed in openjdk, unfortunatelly with side-effects - bug#669716