Mailinglist Archive: opensuse (3513 mails)

< Previous Next >
SuSEconfig.alljava bug (IBMJava is not alljava)
  • From: "Konstantin (Kastus) Shchuka" <kastus@xxxxxxxxx>
  • Date: Fri, 2 Mar 2001 17:01:37 -0800
  • Message-id: <20010302170137.A2085@xxxxxxxxx>
Hi SuSErs,

I installed IBMJava from 7.1 Pro and noticed an annoying message in yast
saying that I don't have IBMJava2 installed.

I checked with rpm -qa, the package was there. Then I looked at the
configuration script which produced the message.

The script is /sbin/conf.d/SuSEconfig.alljava. I guess ``all''
means ``all but IBM'' :-)

Package name detection is implemented incorrectly in that script.
The problem is with ``-'' character in package name.
IBM chose to name its packages IBMJava2-SDK,
IBMJava2-JRE, and so on. The following line in the script:


JAVALINKTO=`rpm -q java java2 ibmjava2 IBMJava2-SDK 2>/dev/null | cut -d- -f 1 | head -n 1`

actually cuts package name to IBMJava2. Then later line

TARGETDIR=`rpm -ql $JAVALINKTO|grep ^/usr/lib/jdk[^/]|head -n 1|cut -d/ -f 4`

spits out ``Package IBMJava2 is not installed'', which is true.

I excluded cut command from JAVALINKTO line and JRELINKTO line so they look now:

JAVALINKTO=`rpm -q java java2 ibmjava2 IBMJava2-SDK 2>/dev/null | head -n 1`
JRELINKTO=`rpm -q javarunt ibmjre2 IBMJava2-JRE 2>/dev/null | head -n 1`

Now script works and establishes correct links for java.

Does anybody know if ``-'' is valid in package name for rpm or it may be used
as a delimiter (name-version) only?

-Kastus

< Previous Next >
This Thread
  • No further messages