Skip to content
Snippets Groups Projects
Commit 58930434 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Fix bug in upgrading rpm

Because of changing filenames, upgrading the package was broken. It
appears to be that the scripts are run in the order of:
 1. postinstall of new
 2. preuninstall of old
 3. postuninstall of old
parent ccb88908
No related branches found
No related tags found
No related merge requests found
...@@ -21,10 +21,13 @@ if [ ${ENVVARS_ON_INSTALL} -eq 1 ]; then ...@@ -21,10 +21,13 @@ if [ ${ENVVARS_ON_INSTALL} -eq 1 ]; then
ln -s $RPM_INSTALL_PREFIX0/@ETC_DIR@/mantid.csh /etc/profile.d/mantid.csh ln -s $RPM_INSTALL_PREFIX0/@ETC_DIR@/mantid.csh /etc/profile.d/mantid.csh
ln -s $RPM_INSTALL_PREFIX0/@ETC_DIR@/mantid.pth @PYTHON_SITE@/mantid.pth ln -s $RPM_INSTALL_PREFIX0/@ETC_DIR@/mantid.pth @PYTHON_SITE@/mantid.pth
else else
# Create symbolic links in world's path # symbolic links in world's path of mantidplot
if [ ! -L /usr/bin/mantidplot@CPACK_PACKAGE_SUFFIX@ ]; then if [ -f $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidplot ]; then
ln -s $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidplot /usr/bin/mantidplot@CPACK_PACKAGE_SUFFIX@ if [ ! -L /usr/bin/mantidplot@CPACK_PACKAGE_SUFFIX@ ]; then
ln -s $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidplot /usr/bin/mantidplot@CPACK_PACKAGE_SUFFIX@
fi
fi fi
# symbolic link for mantidpython
if [ ! -L /usr/bin/mantidpython@CPACK_PACKAGE_SUFFIX@ ]; then if [ ! -L /usr/bin/mantidpython@CPACK_PACKAGE_SUFFIX@ ]; then
ln -s $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidpython /usr/bin/mantidpython@CPACK_PACKAGE_SUFFIX@ ln -s $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidpython /usr/bin/mantidpython@CPACK_PACKAGE_SUFFIX@
fi fi
......
...@@ -10,7 +10,7 @@ ENVVARS_ON_INSTALL=@ENVVARS_ON_INSTALL_INT@ ...@@ -10,7 +10,7 @@ ENVVARS_ON_INSTALL=@ENVVARS_ON_INSTALL_INT@
# Remove exe and links only if it looks like we were removed # Remove exe and links only if it looks like we were removed
# and not upgraded. If launch_mantidplot.sh exists then package # and not upgraded. If launch_mantidplot.sh exists then package
# has been upgraded and MantidPlot_exe replaced so don't touch anything # has been upgraded and MantidPlot_exe replaced so don't touch anything
if [ ! -e $RPM_INSTALL_PREFIX0/@BIN_DIR@/launch_mantidplot.sh ]; then if [ ! -e $RPM_INSTALL_PREFIX0/@BIN_DIR@/mantidplot ]; then
rm $RPM_INSTALL_PREFIX0/@BIN_DIR@/MantidPlot_exe rm $RPM_INSTALL_PREFIX0/@BIN_DIR@/MantidPlot_exe
if [ ${ENVVARS_ON_INSTALL} -eq 1 ]; then if [ ${ENVVARS_ON_INSTALL} -eq 1 ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment