From 3b1d59ba9fa705808edb5937f14847722ed0f7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Nilsson?= Date: Wed, 28 May 2014 22:27:43 +0200 Subject: [PATCH] Added option alsoPackage to avoid removing package files by default and just to remove intermediate files. Also updates some version numbers --- ThirdParty/AllClean | 13 +++++---- ThirdParty/AllClean.stage1 | 21 +++++++------- ThirdParty/AllClean.stage2 | 11 ++++---- ThirdParty/AllClean.stage3 | 20 +++++++------ ThirdParty/AllClean.stage4 | 5 ++-- .../tools/makeThirdPartyFunctionsForRPM | 28 +++++++++++++------ 6 files changed, 58 insertions(+), 40 deletions(-) diff --git a/ThirdParty/AllClean b/ThirdParty/AllClean index 6d74115c6..44daac56d 100755 --- a/ThirdParty/AllClean +++ b/ThirdParty/AllClean @@ -27,6 +27,7 @@ # # Description # Cleanup script for ThirdParty packages. +# Add option alsoPackage to remove the installed files. # # Author: # Martin Beaudoin, Hydro-Quebec, (2013) @@ -50,22 +51,22 @@ echo ======================================== echo # Cleaning stage 1 -./AllClean.stage1 +./AllClean.stage1 $1 # Cleaning stage 2 -./AllClean.stage2 +./AllClean.stage2 $1 # Cleaning stage 3 -./AllClean.stage3 +./AllClean.stage3 $1 # Cleaning stage 4 -./AllClean.stage4 +./AllClean.stage4 $1 # Cleaning stage 5 -./AllClean.stage5 +./AllClean.stage5 $1 # Cleaning stage 6 -./AllClean.stage6 +./AllClean.stage6 $1 echo ======================================== echo Done ThirdParty Allclean diff --git a/ThirdParty/AllClean.stage1 b/ThirdParty/AllClean.stage1 index ea0928a1c..a2420c3b0 100755 --- a/ThirdParty/AllClean.stage1 +++ b/ThirdParty/AllClean.stage1 @@ -27,6 +27,7 @@ # # Description # Cleaning script for ThirdParty packages: Stage1 +# Add option alsoPackage to remove the installed files. # # Author: # Martin Beaudoin, Hydro-Quebec, (2013) @@ -50,32 +51,32 @@ echo ======================================== echo # gmp -uninstallPackage gmp-5.0.1 +uninstallPackage gmp-5.0.1 $1 # mpfr -uninstallPackage mpfr-3.0.1 +uninstallPackage mpfr-3.0.1 $1 # gcc -uninstallPackage gcc-4.4.5 -uninstallPackage gcc-4.5.1 +uninstallPackage gcc-4.4.5 $1 +uninstallPackage gcc-4.5.1 $1 # mpc -uninstallPackage mpc-0.8.2 +uninstallPackage mpc-0.8.2 $1 #Python -uninstallPackage Python-2.7 +uninstallPackage Python-2.7 $1 # m4 -uninstallPackage m4-1.4.16 +uninstallPackage m4-1.4.16 $1 # bison -uninstallPackage bison-2.4.3 +uninstallPackage bison-2.4.3 $1 # flex -uninstallPackage flex-2.5.35 +uninstallPackage flex-2.5.35 $1 # cmake -uninstallPackage cmake-2.8.11 +uninstallPackage cmake-2.8.12 $1 echo diff --git a/ThirdParty/AllClean.stage2 b/ThirdParty/AllClean.stage2 index 4efd635da..2e5dca2fd 100755 --- a/ThirdParty/AllClean.stage2 +++ b/ThirdParty/AllClean.stage2 @@ -30,6 +30,7 @@ # # Author: # Martin Beaudoin, Hydro-Quebec, (2013) +# Add option alsoPackage to remove the installed files. # #------------------------------------------------------------------------------ # run from third-party directory only @@ -50,11 +51,11 @@ echo ======================================== echo # openmpi -uninstallPackage openmpi-1.4.1 -uninstallPackage openmpi-1.4.3 -uninstallPackage openmpi-1.5 -uninstallPackage openmpi-1.6.3 -uninstallPackage openmpi-1.6.5 +uninstallPackage openmpi-1.4.1 $1 +uninstallPackage openmpi-1.4.3 $1 +uninstallPackage openmpi-1.5 $1 +uninstallPackage openmpi-1.6.3 $1 +uninstallPackage openmpi-1.6.5 $1 echo echo ======================================== diff --git a/ThirdParty/AllClean.stage3 b/ThirdParty/AllClean.stage3 index 1e8a39f89..8fee0e5be 100755 --- a/ThirdParty/AllClean.stage3 +++ b/ThirdParty/AllClean.stage3 @@ -27,6 +27,7 @@ # # Description # Cleaning script for ThirdParty packages: Stage3 +# Add option alsoPackage to remove the installed files. # # Author: # Martin Beaudoin, Hydro-Quebec, (2013) @@ -50,31 +51,32 @@ echo ======================================== echo # metis -uninstallPackage metis-5.0pre2 +uninstallPackage metis-5.1.0 $1 # ParMGridGen -uninstallPackage ParMGridGen-1.0 +uninstallPackage ParMGridGen-1.0 $1 # Libccmio -uninstallPackage libccmio-2.6.1 +uninstallPackage libccmio-2.6.1 $1 # Mesquite -uninstallPackage mesquite-2.1.2 +uninstallPackage mesquite-2.1.2 $1 # Scotch/PtScotch -uninstallPackage scotch-5.1.10b +uninstallPackage scotch-6.0.0 $1 +uninstallPackage scotch_6.0.0 $1 # ParMertis -uninstallPackage ParMetis-3.1.1 +uninstallPackage parmetis-4.0.3 $1 # Zoltan -# uninstallPackage zoltan-3.6 +# uninstallPackage zoltan-3.6 $1 # PyFoam -uninstallPackage PyFoam-0.6.1 +uninstallPackage PyFoam-0.6.1 $1 # hwloc -uninstallPackage hwloc-1.7.1 +uninstallPackage hwloc-1.7.2 $1 echo echo ======================================== diff --git a/ThirdParty/AllClean.stage4 b/ThirdParty/AllClean.stage4 index 221982516..6b2f5354c 100755 --- a/ThirdParty/AllClean.stage4 +++ b/ThirdParty/AllClean.stage4 @@ -27,6 +27,7 @@ # # Description # Cleaning script for ThirdParty packages: Stage4 +# Add option alsoPackage to remove the installed files. # # Author: # Martin Beaudoin, Hydro-Quebec, (2013) @@ -50,10 +51,10 @@ echo ======================================== echo # QT -uninstallPackage qt-everywhere-opensource-src-4.7.4 +uninstallPackage qt-everywhere-opensource-src-4.7.4 $1 # ParaView -uninstallPackage ParaView-3.12.0 +uninstallPackage ParaView-3.12.0 $1 echo echo ======================================== diff --git a/ThirdParty/tools/makeThirdPartyFunctionsForRPM b/ThirdParty/tools/makeThirdPartyFunctionsForRPM index 50dcbe661..db8ecbdf5 100755 --- a/ThirdParty/tools/makeThirdPartyFunctionsForRPM +++ b/ThirdParty/tools/makeThirdPartyFunctionsForRPM @@ -254,16 +254,28 @@ rpm_populateRPMvault() uninstallPackage() { pkg="$1"; - if [ -d $WM_THIRD_PARTY_DIR/packages/${pkg} ]; then - set -x - rm -f $WM_THIRD_PARTY_DIR/rpmBuild/RPMS/$architecture/${pkg}*.rpm - rm -f $WM_THIRD_PARTY_DIR/rpmBuild/TGZS/$architecture/${pkg}.tgz - rm -rf $WM_THIRD_PARTY_DIR/rpmBuild/BUILD/${pkg}* - rm -rf $WM_THIRD_PARTY_DIR/packages/$pkg - set +x + + echo "Removing ${pkg}" + [ -f $WM_THIRD_PARTY_DIR/rpmBuild/RPMS/$architecture/${pkg}*.rpm ] && \ + rm -f $WM_THIRD_PARTY_DIR/rpmBuild/RPMS/$architecture/${pkg}*.rpm || \ + echo "Not found: $WM_THIRD_PARTY_DIR/rpmBuild/RPMS/$architecture/${pkg}*.rpm" + [ -f $WM_THIRD_PARTY_DIR/rpmBuild/SOURCES/${pkg}.tar.gz ] && \ + rm -f $WM_THIRD_PARTY_DIR/rpmBuild/SOURCES/${pkg}.tar.gz || \ + echo "Not found: $WM_THIRD_PARTY_DIR/rpmBuild/SOURCES/${pkg}.tar.gz" + [ -f $WM_THIRD_PARTY_DIR/rpmBuild/TGZS/$architecture/${pkg}.tgz ] && \ + rm -f $WM_THIRD_PARTY_DIR/rpmBuild/TGZS/$architecture/${pkg}.tgz || \ + echo "Not found: $WM_THIRD_PARTY_DIR/rpmBuild/TGZS/$architecture/${pkg}.tgz" + [ -d $WM_THIRD_PARTY_DIR/rpmBuild/BUILD/${pkg}* ] && \ + rm -rf $WM_THIRD_PARTY_DIR/rpmBuild/BUILD/${pkg}* || \ + echo "Not found: $WM_THIRD_PARTY_DIR/rpmBuild/BUILD/${pkg}*" + if [ "$2" = "alsoPackage" ]; then + [ -d $WM_THIRD_PARTY_DIR/packages/$pkg ] && \ + rm -rf $WM_THIRD_PARTY_DIR/packages/$pkg || \ + echo "Not found: $WM_THIRD_PARTY_DIR/packages/$pkg" else - echo "Package ${pkg} is already removed." + echo "Add option alsoPackage to remove the installed files." fi + echo } # ----------------------------------------------------------------- end-of-file