summaryrefslogtreecommitdiff
path: root/javainstaller2/src
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-05-06 09:42:04 +0000
committerKurt Zenker <kz@openoffice.org>2008-05-06 09:42:04 +0000
commit2ad18373e182449c97474abeb576d2b5fb9597d0 (patch)
tree4fa95bfb7766659e588ae3adfe2268aea78accae /javainstaller2/src
parenta6f17e3981539577ad2add6da7633bd0d50ae38a (diff)
INTEGRATION: CWS native147 (1.5.2); FILE MERGED
2008/04/25 12:10:42 is 1.5.2.1: #i88334# /opt for linux rpm because of rpm 3
Diffstat (limited to 'javainstaller2/src')
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
index 8424d4da8659..d82d470a54dd 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: LinuxInstaller.java,v $
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
* This file is part of OpenOffice.org.
*
@@ -168,10 +168,19 @@ public class LinuxInstaller extends Installer {
packageName = completePackage.getPath();
if ( completePackage.exists() ) {
- String fixedInstallDir = helper.fixInstallationDirectory(installDir);
String relocations = helper.getRelocationString(packageData, packageName);
if ( relocations != null ) {
- relocations = relocations + fixedInstallDir;
+ // Problem: If Prefix = "/" the packages are not relocatable with RPM version 3.x .
+ // Therefore Prefix has to be "/opt" in spec file, although packages shall not be
+ // relocatable (except for installations with root privileges). So /opt has to be
+ // listed left and right of equal sign: --relocate /opt=<installDir>/opt
+ // -> /opt has to be added to the installDir
+ File localInstallDir = new File(installDir, relocations); // "/" -> "/opt"
+ String localInstallDirString = localInstallDir.getPath();
+
+ // Fixing problem with installation directory and RPM version 3.x
+ String fixedInstallDir = helper.fixInstallationDirectory(localInstallDirString);
+ relocations = relocations + "=" + fixedInstallDir;
// relocations: "/opt/staroffice8=" + fixedInstallDir;
}