LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   MULTILIB - convertpkg-compat32 edit of jdk doinst.sh causes error (Slack 64 current) (http://www.linuxquestions.org/questions/slackware-14/multilib-convertpkg-compat32-edit-of-jdk-doinst-sh-causes-error-slack-64-current-946939/)

TracyTiger 05-26-2012 02:46 AM

MULTILIB - convertpkg-compat32 edit of jdk doinst.sh causes error (Slack 64 current)
 
MULTILIB is new to me and I have a question on the editing that the convertpkg-compat32 program performs on the doinst.sh files.

On the Alien Bob multilib wiki (http://alien.slackbook.org/dokuwiki/...kware:multilib) a note is made to ignore installation errors regarding /etc files...

Quote:

When installing the compat32 packages you will notice that some will show errors about missing files in /etc. This is “by design”, and these errors can be ignored. These messages are caused by the fact that files in /etc are removed from a ”-compat32” package during conversion
I found that running the convertpkg-compat32 program on the jdk package in /extra results in an install script error. The before and after version of the install script is shown below.


doinst.sh before conversion.

Code:

# Clean up a potential upgrade mess caused by changing the
# installation directory to /usr/lib/java/:
if [ -L usr/lib/java ]; then
  rm -rf usr/lib/java
  mkdir -p usr/lib/java/man
  mkdir -p usr/lib/java/jre/lib/i386/server
  mkdir -p usr/lib/java/jre/lib/i386/client
  mkdir -p usr/lib/java/jre/javaws
  mkdir -p usr/lib/java/jre/bin
  mkdir -p usr/lib/java/bin
  mkdir -p usr/lib/mozilla/plugins
fi
if [ -L ControlPanel ]; then
  rm -f ControlPanel
fi
if [ -L ja ]; then
  rm -f ja
fi
if [ -L javaws ]; then
  rm -f javaws
fi
if [ -L libjsig.so ]; then
  rm -f libjsig.so
fi
# End cleanup.
( cd usr/lib/mozilla/plugins ; rm -rf libnpjp2.so )Should I be concerned that the changes made by convertpkg-compat32 may cause problems?
( cd usr/lib/mozilla/plugins ; ln -sf /usr/lib/java/jre/lib/i386/libnpjp2.so libnpjp2.so )
( cd usr/lib/java/bin ; rm -rf ControlPanel )
( cd usr/lib/java/bin ; ln -sf ./jcontrol ControlPanel )
( cd usr/lib/java/man ; rm -rf ja )
( cd usr/lib/java/man ; ln -sf ja_JP.eucJP ja )
( cd usr/lib/java/jre/bin ; rm -rf ControlPanel )
( cd usr/lib/java/jre/bin ; ln -sf ./jcontrol ControlPanel )
( cd usr/lib/java/jre/lib/i386/server ; rm -rf libjsig.so )
( cd usr/lib/java/jre/lib/i386/server ; ln -sf ../libjsig.so libjsig.so )
( cd usr/lib/java/jre/lib/i386/client ; rm -rf libjsig.so )
( cd usr/lib/java/jre/lib/i386/client ; ln -sf ../libjsig.so libjsig.so )
( cd usr/lib/java/jre/javaws ; rm -rf javaws )
( cd usr/lib/java/jre/javaws ; ln -sf ../bin/javaws javaws )
( cd usr/lib ; rm -rf libjvm.so )
( cd usr/lib ; ln -sf ./java/jre/lib/i386/server/libjvm.so libjvm.so )
( cd usr/lib ; rm -rf jdk1.6.0_27 )
( cd usr/lib ; ln -sf java jdk1

doinst.sh after conversion.

Code:

# installation directory to /usr/lib/java/:
if [ -L usr/lib/java ]; then
  rm -rf usr/lib/java
  mkdir -p usr/lib/java/man
  mkdir -p usr/lib/java/jre/lib/i386/server
  mkdir -p usr/lib/java/jre/lib/i386/client
  mkdir -p usr/lib/java/jre/javaws
  mkdir -p usr/lib/java/jre/bin
  mkdir -p usr/lib/java/bin
  mkdir -p usr/lib/mozilla/plugins
( cd usr/lib/mozilla/plugins ; rm -rf libnpjp2.so )
( cd usr/lib/mozilla/plugins ; ln -sf /usr/lib/java/jre/lib/i386/libnpjp2.so libnpjp2.so )
( cd usr/lib/java/bin ; rm -rf ControlPanel )
( cd usr/lib/java/bin ; ln -sf ./jcontrol ControlPanel )
( cd usr/lib/java/man ; rm -rf ja )
( cd usr/lib/java/man ; ln -sf ja_JP.eucJP ja )
( cd usr/lib/java/jre/bin ; rm -rf ControlPanel )
( cd usr/lib/java/jre/bin ; ln -sf ./jcontrol ControlPanel )
( cd usr/lib/java/jre/lib/i386/server ; rm -rf libjsig.so )
( cd usr/lib/java/jre/lib/i386/server ; ln -sf ../libjsig.so libjsig.so )
( cd usr/lib/java/jre/lib/i386/client ; rm -rf libjsig.so )
( cd usr/lib/java/jre/lib/i386/client ; ln -sf ../libjsig.so libjsig.so )
( cd usr/lib/java/jre/javaws ; rm -rf javaws )
( cd usr/lib/java/jre/javaws ; ln -sf ../bin/javaws javaws )
( cd usr/lib ; rm -rf libjvm.so )
( cd usr/lib ; ln -sf ./java/jre/lib/i386/server/libjvm.so libjvm.so )
( cd usr/lib ; rm -rf jdk1.6.0_27 )
( cd usr/lib ; ln -sf java jdk1.6.0_27 )

The difference in the scripts was brought to my attention by the script error message (syntax error in line 29) due to missing closing 'fi'. Configuration files in /etc don't appear to be involved in this case.

Should I be concerned that the changes made by convertpkg-compat32 may cause problems? Or do the modifications made by convertpkg-compat32 never cause problems and I should ignore errors even when /etc config files are not involved?

Thanks.

Cultist 05-26-2012 03:53 AM

They most likely will not cause problems.

When you convert a package to a 32-bit compatibility package, you're creating a new package to install alongside the original. So you'll have your original 64-bit jdk, and then a separate 32-bit jdk-compat32 package which is its own entity. So even if the conversion process causes a problem, you can just remove the compat32 package like any other package, and worst case scenario you're back to where you're at now.

phenixia2003 05-26-2012 05:08 AM

Hello,

I looked at this and I think that convertpkg-compat32 should give
more attention to the jdk package to not break the doinst.sh as
it does.

Indeed, the grep used by convertpkg-compat32 to process the doinst.sh
from the JDK leaves the line "if [ -L usr/lib/java ] " because it
contains the pattern "lib", but as the line that ends this "if"
does not contains any of the searched pattern (i.e: usr/bin |lib |lib/),
the "if" is left unclosed and all commands that was outside this "if"
become inside of it, and will never be executed, thus, all the symlinks
that should be created, will not.

However, I'm wondering why you need the 32-bit version of the jdk ? Are
you using something so specific that the 64-bit jdk can't be used ?

--
SeB

TracyTiger 05-26-2012 09:48 AM

Quote:

Originally Posted by phenixia2003 (Post 4688013)
However, I'm wondering why you need the 32-bit version of the jdk ? Are
you using something so specific that the 64-bit jdk can't be used ?

I just started to install VirtualBox on Slack64-current and Slackbuilds notes showed jdk as a requirement.

Alien Bob 05-26-2012 10:09 AM

Quote:

Originally Posted by Tracy Tiger (Post 4688115)
I just started to install VirtualBox on Slack64-current and Slackbuilds notes showed jdk as a requirement.

The 64-bit JDK is fine for that. No need to convert 32-bit JDK package using my script.

The required effort to modify the script to parse a doinst.sh script faultlessly is just too extreme. Ignore the installation error, it does not hurt your system.

Eric

TracyTiger 05-26-2012 10:30 AM

Okay to Ignore Errors
 
Thanks Eric. I'll ignore the errors found with doinst.sh when using convertpkg-compat32.

Thanks to Cultist & phenixia203 for your responses.


All times are GMT -5. The time now is 04:30 PM.