You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by ri...@apache.org on 2016/11/10 18:30:14 UTC

incubator-madlib git commit: Build: Fix version used in rpm installation

Repository: incubator-madlib
Updated Branches:
  refs/heads/master 150459d66 -> 82e56a46f


Build: Fix version used in rpm installation

During MADlib installation a directory is created in `Versions` that
contains the current version. A soft link called `Current` is created
in the root for madpack to link to this directory.

Versions that have a hyphen were invalid for gppkg and hence were
updated to replace hyphen with an underscore. This led to discrepancy
with the softlink. This commit fixes that bug by ensuring the softlink
links to the right place.


Project: http://git-wip-us.apache.org/repos/asf/incubator-madlib/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-madlib/commit/82e56a46
Tree: http://git-wip-us.apache.org/repos/asf/incubator-madlib/tree/82e56a46
Diff: http://git-wip-us.apache.org/repos/asf/incubator-madlib/diff/82e56a46

Branch: refs/heads/master
Commit: 82e56a46f6e902deca29580f6416bb1d60c9262a
Parents: 150459d
Author: Nandish Jayaram <nj...@apache.org>
Authored: Tue Nov 8 15:49:01 2016 -0800
Committer: Rahul Iyer <ri...@apache.org>
Committed: Thu Nov 10 10:30:01 2016 -0800

----------------------------------------------------------------------
 deploy/postflight.sh | 2 +-
 deploy/rpm_post.sh   | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/82e56a46/deploy/postflight.sh
----------------------------------------------------------------------
diff --git a/deploy/postflight.sh b/deploy/postflight.sh
index 019ed6f..ddc1f81 100755
--- a/deploy/postflight.sh
+++ b/deploy/postflight.sh
@@ -2,7 +2,7 @@
 
 # $0 - Script Path, $1 - Package Path, $2 - Target Location, and $3 - Target Volumn
 
-MADLIB_VERSION=1.9.1
+MADLIB_VERSION=1.10.0
 
 find $2/usr/local/madlib/bin -type d -exec cp -RPf {} $2/usr/local/madlib/old_bin \; 2>/dev/null
 find $2/usr/local/madlib/bin -depth -type d -exec rm -r {} \; 2>/dev/null

http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/82e56a46/deploy/rpm_post.sh
----------------------------------------------------------------------
diff --git a/deploy/rpm_post.sh b/deploy/rpm_post.sh
index cfdfb8f..9400be8 100755
--- a/deploy/rpm_post.sh
+++ b/deploy/rpm_post.sh
@@ -4,6 +4,12 @@ find $RPM_INSTALL_PREFIX/madlib/bin -depth -type d -exec rm -r {} \; 2>/dev/null
 find $RPM_INSTALL_PREFIX/madlib/doc -type d -exec cp -RPf {} $RPM_INSTALL_PREFIX/madlib/old_doc \; 2>/dev/null
 find $RPM_INSTALL_PREFIX/madlib/doc -depth -type d -exec rm -r {} \; 2>/dev/null
 
-ln -nsf $RPM_INSTALL_PREFIX/madlib/Versions/%{_madlib_version} $RPM_INSTALL_PREFIX/madlib/Current
+
+# RPM version is setup with underscore replaced for hyphen but
+# the actual version contains a hyphen. The symlink created on disk
+# is with a hyphen instead of the underscore.
+MADLIB_VERSION_NO_HYPHEN=%{_madlib_version}
+MADLIB_VERSION="${MADLIB_VERSION_NO_HYPHEN/_/-}"
+ln -nsf $RPM_INSTALL_PREFIX/madlib/Versions/$MADLIB_VERSION $RPM_INSTALL_PREFIX/madlib/Current
 ln -nsf $RPM_INSTALL_PREFIX/madlib/Current/bin $RPM_INSTALL_PREFIX/madlib/bin
 ln -nsf $RPM_INSTALL_PREFIX/madlib/Current/doc $RPM_INSTALL_PREFIX/madlib/doc