[ARVADOS-DEV] created: acab2f7c338f245baa7e5d9dca57476d12d863bf

Git user git at public.curoverse.com
Fri Feb 26 18:21:44 EST 2016


        at  acab2f7c338f245baa7e5d9dca57476d12d863bf (commit)


commit acab2f7c338f245baa7e5d9dca57476d12d863bf
Author: Brett Smith <brett at curoverse.com>
Date:   Fri Feb 26 18:20:41 2016 -0500

    8371: Rails postrm only fires after removing last RPM.
    
    This prevents removing the package files when the postrm script is
    called for the old version of a package after doing an upgrade.
    
    RPM post- scripts are called with $1 as the number of versions of the
    package currently installed on the system.  0 means the last version
    has been removed.  We only want to remove files in that case.

diff --git a/jenkins/rails-package-scripts/postrm.sh b/jenkins/rails-package-scripts/postrm.sh
index 8c45d2f..2d63f0b 100644
--- a/jenkins/rails-package-scripts/postrm.sh
+++ b/jenkins/rails-package-scripts/postrm.sh
@@ -14,7 +14,7 @@ purge () {
 if [ "$1" = 'purge' ]; then
   # This is a debian-based system and purge was requested
   purge
-elif [ "$1" = "0" ] || [ "$1" = "1" ] || [ "$1" = "2" ]; then
+elif [ "$1" = "0" ]; then
   # This is an rpm-based system, no guarantees are made, always purge
   # Apparently yum doesn't actually remember what it installed.
   # Clean those files up here, then purge.

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list