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/12/19 18:22:48 UTC

incubator-madlib git commit: Fix post process for gppkg to link to hyphenated directories

Repository: incubator-madlib
Updated Branches:
  refs/heads/master 6138b0061 -> 38d1e87a8


Fix post process for gppkg to link to hyphenated directories


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

Branch: refs/heads/master
Commit: 38d1e87a83b44dcef2c6acd9eaa4c8d2e922384c
Parents: 6138b00
Author: Rahul Iyer <ri...@apache.org>
Authored: Thu Dec 15 11:44:39 2016 -0800
Committer: Rahul Iyer <ri...@apache.org>
Committed: Mon Dec 19 10:22:12 2016 -0800

----------------------------------------------------------------------
 deploy/gppkg/madlib.spec.in | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-madlib/blob/38d1e87a/deploy/gppkg/madlib.spec.in
----------------------------------------------------------------------
diff --git a/deploy/gppkg/madlib.spec.in b/deploy/gppkg/madlib.spec.in
index feb7473..34f4b89 100644
--- a/deploy/gppkg/madlib.spec.in
+++ b/deploy/gppkg/madlib.spec.in
@@ -45,9 +45,16 @@ then
 fi
 
 %post
-ln -nsf $RPM_INSTALL_PREFIX/madlib/Versions/%{_madlib_version} $RPM_INSTALL_PREFIX/madlib/Current
+
+# GPPKG version is setup with underscore replacing a hyphen but
+# the actual directories created on disk use the hyphenated version.
+# Hence we replace the underscore to link to the right location
+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
+
 # creating symlink for madpack (does not work at present)
 # find $RPM_INSTALL_PREFIX/bin/madpack -type f -exec mv {} $RPM_INSTALL_PREFIX/bin/old_madpack \; 2>/dev/null
 # ln -nsf $RPM_INSTALL_PREFIX/madlib/Current/bin/madpack $RPM_INSTALL_PREFIX/bin/madpack