RPM Obsoletes don't work like I want them to
Paul Johnson
pauljohn32 at gmail.com
Sat Jan 30 21:45:43 UTC 2010
Currently I have the rpms for java development kit from openjdk.
Package names are like so:
# rpm -qa | grep openjdk
java-1.6.0-openjdk-devel-1.6.0.0-1.7.b09.el5
java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5
I want to replace those with RPMS built from the Sun JDK, and those
rpms have names like:
java-1.6.0-sun-1.6.0.18-2.0.Centos54kups.i586.rpm
java-1.6.0-sun-alsa-1.6.0.18-2.0.Centos54kups.i586.rpm
java-1.6.0-sun-demo-1.6.0.18-2.0.Centos54kups.i586.rpm
java-1.6.0-sun-devel-1.6.0.18-2.0.Centos54kups.i586.rpm
java-1.6.0-sun-fonts-1.6.0.18-2.0.Centos54kups.i586.rpm
java-1.6.0-sun-jdbc-1.6.0.18-2.0.Centos54kups.i586.rpm
java-1.6.0-sun-plugin-1.6.0.18-2.0.Centos54kups.i586.rpm
java-1.6.0-sun-src-1.6.0.18-2.0.Centos54kups.i586.rpm
I built them following instructions on the jpackage website, they are
intended to be consistent with Fedora/RedHat packaging. Those install
along side the openjdk.
I want the rpm install of java-1.6.0-sun to remove the
java-1.6.0-openjdk package. I thought the SPEC option Obsoletes would
get that. In my sun jdk spec file, the top 100 lines of which I paste
in below. I've done something wrong, because when I install those with
the usual "rpm -ivh java-1.6.0-sun-1.6.0.18-2.0.Centos54kups.i586.rpm"
then the openjdk packages are not removed.
Epoch: 1
Summary: Java Runtime Environment for %{name}
License: Sun Binary Code License
Group: Development/Interpreters
URL: http://java.sun.com/j2se/%{javaver}
Source0: jdk-%{cvsversion}-linux-%{target_cpu}.bin
Source1: %{name}-register-java-fonts.xsl
Source2: %{name}-unregister-java-fonts.xsl
NoSource: 0
Provides: jre-%{javaver}-%{origin} = %{epoch}:%{version}-%{release}
Provides: jre-%{origin} = %{epoch}:%{version}-%{release}
Provides: jre-%{javaver}, java-%{javaver}, jre = %{epoch}:%{javaver}
Provides: java-%{origin} = %{epoch}:%{version}-%{release}
Provides: java = %{epoch}:%{javaver}
Requires: /usr/sbin/update-alternatives
Requires: jpackage-utils >= 0:1.5.38
Conflicts: kaffe
BuildArch: i586 x86_64
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: jpackage-utils >= 0:1.5.38, sed, %{_bindir}/perl
BuildRequires: desktop-file-utils
Provides: javaws = %{epoch}:%{javaws_ver}
Provides: jndi = %{epoch}:%{version}, jndi-ldap = %{epoch}:%{version}
Provides: jndi-cos = %{epoch}:%{version}, jndi-rmi = %{epoch}:%{version}
Provides: jndi-dns = %{epoch}:%{version}
Provides: jaas = %{epoch}:%{version}
Provides: jsse = %{epoch}:%{version}
Provides: jce = %{epoch}:%{version}
Provides: jdbc-stdext = %{epoch}:3.0, jdbc-stdext = %{epoch}:%{version}
Provides: java-sasl = %{epoch}:%{version}
Obsoletes: javaws-menu
Obsoletes: java-1.6.0-openjdk
%description
This package contains the Java Runtime Environment for %{name}
%package devel
Summary: Java Development Kit for %{name}
Group: Development/Compilers
Requires: /usr/sbin/update-alternatives
Provides: java-sdk-%{javaver}-%{origin} = %{epoch}:%{version}-%{release}
Provides: java-sdk-%{origin} = %{epoch}:%{version}-%{release}
Provides: java-sdk-%{javaver}, java-sdk = %{epoch}:%{javaver}
Provides: java-devel-%{origin} = %{epoch}:%{version}-%{release}
Provides: java-%{javaver}-devel, java-devel = %{epoch}:%{javaver}
Requires: %{name} = %{epoch}:%{version}-%{release}
Obsoletes: java-1.6.0-openjdk-devel
%description devel
The Java(tm) Development Kit (JDK(tm)) contains the software and tools that
developers need to compile, debug, and run applets and applications
written using the Java programming language.
--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas
More information about the Rpm-list
mailing list