diff options
author | Ingo Schmidt <is@openoffice.org> | 2010-08-13 11:15:11 +0200 |
---|---|---|
committer | Ingo Schmidt <is@openoffice.org> | 2010-08-13 11:15:11 +0200 |
commit | 969f4032e8ee1339cbbc339466f0122f8c1fb8a8 (patch) | |
tree | 5616493850f7ee436a486433943400b6f9ad3a9a /setup_native/scripts | |
parent | a7aba8a191e1c73f0da129c98d6942e766b70c1f (diff) |
native324 #i113835# preparing rpm installation on debian systems
Diffstat (limited to 'setup_native/scripts')
-rw-r--r-- | setup_native/scripts/install_linux.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/setup_native/scripts/install_linux.sh b/setup_native/scripts/install_linux.sh index fe4be73f77ea..c33fe989554f 100644 --- a/setup_native/scripts/install_linux.sh +++ b/setup_native/scripts/install_linux.sh @@ -121,6 +121,14 @@ then exit 2 fi +# #163256# check if we are on a debian system... +if rpm --help | grep debian >/dev/null; +then + DEBIAN_FLAGS="--force-debian --nodeps" +else + DEBIAN_FLAGS= +fi + # # Determine whether this should be an update or a fresh install # @@ -227,7 +235,7 @@ FAKEDBRPM=/tmp/fake-db-1.0-$$.noarch.rpm linenum=??? tail -n +$linenum $0 > $FAKEDBRPM -rpm --upgrade --ignoresize --dbpath $RPM_DB_PATH $FAKEDBRPM +rpm ${DEBIAN_FLAGS} --upgrade --ignoresize --dbpath $RPM_DB_PATH $FAKEDBRPM rm -f $FAKEDBRPM @@ -253,7 +261,7 @@ echo "Installing the RPMs" ABSROOT=`cd ${INSTALLDIR}; pwd` RELOCATIONS=`rpm -qp --qf "--relocate %{PREFIXES}=${ABSROOT}%{PREFIXES} \n" $RPMLIST | sort -u | tr -d "\012"` -UserInstallation=\$BRAND_BASE_DIR/../UserInstallation rpm $RPMCMD --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST +UserInstallation=\$BRAND_BASE_DIR/../UserInstallation rpm ${DEBIAN_FLAGS} $RPMCMD --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST # # Create a link into the users home directory @@ -268,11 +276,11 @@ if [ "$UPDATE" = "yes" -a ! -f $INSTALLDIR/program/bootstraprc ] then echo echo "Update failed due to a bug in RPM, uninstalling .." - rpm --erase -v --nodeps --dbpath $RPM_DB_PATH `rpm --query --queryformat "%{NAME} " --package $RPMLIST --dbpath $RPM_DB_PATH` + rpm ${DEBIAN_FLAGS} --erase -v --nodeps --dbpath $RPM_DB_PATH `rpm --query --queryformat "%{NAME} " --package $RPMLIST --dbpath $RPM_DB_PATH` echo echo "Now re-installing new packages .." echo - rpm --install --nodeps --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST + rpm ${DEBIAN_FLAGS} --install --nodeps --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST echo fi |