Red Hat Bugzilla – Bug 236734
upgrade problems with multiple versions of Java RPM's
Last modified: 2007-11-30 17:12:02 EST
Description of problem:
I seem to have an issue with RPM in combination with Sun's Java JDK RPMs.
On my FC5 box (or RHEL3 or RHEL4 box, for that matter) I want to install both
j2sdk 1.4.2 and jdk 1.5.0 from Sun: 1.4.2 for backwards compatibility testing,
1.5.0 for new development; for this I use the RPM's provided by sun, which
install fine. The j2sdk 1.4.2 is installed into /usr/java/j2sdk1.4.2_11 and the
jdk 1.5.0 is installed into /usr/java/jdk1.5.0_08. So far so good.
The problem arises when I install an *upgrade* for the j2sdk1.4.2 RPM:
rpm -Uvh --test -vv j2sdk-1_4_2_13-linux-i586.rpm
If there's another RPM installed on the system which depends on jdk1.5, this
upgrade will fail. I have also installed java-1.5.0-sun-compat-1.5.0.08-1jpp
from http://www.jpackage.org. Now
# rpm -U --test j2sdk-1_4_2_13-linux-i586.rpm
error: Failed dependencies:
jdk = 2000:1.5.0_08-fcs is needed by (installed)
This all seems related to the 'provides' from both rpm's:
# rpm -q --provides j2sdk
j2sdk = 2000:1.4.2_09-fcs
# rpm -q --provides jdk
jre = 1.5.0_08
j2sdk = 1.5.0_08
j2re = 1.5.0_08
jdk = 2000:1.5.0_08-fcs
The fact that the jdk RPM also provides j2sdk but *without* the epoch 2000:
seems to make RPM want to throw away jdk1.5 !!! Why? There are no conflicts or
obsoletes in both packages:
# rpm -q --conflicts j2sdk
# rpm -q --obsoletes j2sdk
# rpm -q --conflicts jdk
# rpm -q --obsoletes jdk
This RPM behaviour causes the upgrade to fail, as other packages depend on the
jdk1.5 explicitly .
Version-Release number of selected component (if applicable):
this happens in
- rpm-4.4.2-15.2 (fc5)
- rpm-4.2.3 (el3)
- rpm-4.3.3 (el4)
Steps to Reproduce:
1. install j2sdk 1.4.2_09 rpm from Sun
2. install j2sdk 1.5.0_08 (or higher) rpm from Sun
3. upgrade j2sdk 1.4.2 to 1.4.2_13 from Sun
it will remove jdk 1.5.0_08 or , in case another rpm depends on jdk-1.5, the
upgrade will fail
- upgrade j2sdk1.4.2_09 to j2sdk1.4.2_13
- leave jdk1.5.0_08 alone
An upgrade will erase any package with a provides of the same name and a lowe version.
So the rpm behavior is as expected even if not desired for your java packages.
Adding --noupgrade when installing will disable the erasing of older packages, and
erasing whatever packages manually afterwards might work.
That's about all that can reasonably be accomplished to handle this specific multi-jdk problem.
Provides as implicit obsoletes behavior has been reverted in rpm 18.104.22.168 for
reasons like this.
FC5 is EOL but fixed in rawhide...