hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [5/5] incubator-hawq git commit: HAWQ-938. Remove ivy.xml in gpopt and read orca version from header file
Date Mon, 01 Aug 2016 02:54:35 GMT
HAWQ-938. Remove ivy.xml in gpopt and read orca version from header file

The old mechanism extracted the version numbers from the Ivy config file,
which doesn't do the right thing if you build without Ivy. Using the
version headers is simpler, anyway.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/78c27665
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/78c27665
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/78c27665

Branch: refs/heads/master
Commit: 78c2766578102501e67c133df942fc6355d56c8e
Parents: 950065b
Author: Haisheng Yuan <hyuan@pivotal.io>
Authored: Wed Jul 20 13:14:25 2016 -0700
Committer: Ming LI <mli@pivotal.io>
Committed: Mon Aug 1 10:51:29 2016 +0800

----------------------------------------------------------------------
 src/backend/gpopt/gpopt.mk        |  9 ----
 src/backend/gpopt/ivy-build.xml   | 89 ----------------------------------
 src/backend/gpopt/ivy.xml         | 45 -----------------
 src/backend/gpopt/utils/funcs.cpp | 12 +++--
 4 files changed, 8 insertions(+), 147 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/78c27665/src/backend/gpopt/gpopt.mk
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/gpopt.mk b/src/backend/gpopt/gpopt.mk
index 2fffc22..4f8bbca 100644
--- a/src/backend/gpopt/gpopt.mk
+++ b/src/backend/gpopt/gpopt.mk
@@ -54,12 +54,6 @@ else
 	ARCH_FLAGS = -m64
 endif
 
-GREP_SED_VAR = $(top_builddir)/src/backend/gpopt/ivy.xml | sed -e 's|\(.*\)rev="\(.*\)"[
]*conf\(.*\)|\2|'
-
-XERCES_VER  = $(shell grep "\"xerces-c\""   $(GREP_SED_VAR))
-LIBGPOS_VER = $(shell grep "\"libgpos\""    $(GREP_SED_VAR))
-OPTIMIZER_VER = $(shell grep "\"optimizer\""  $(GREP_SED_VAR))
-
 ORCA_BLD_PATH=$(abs_top_builddir)/depends/thirdparty
 
 LIBGPOS_DIR = $(ORCA_BLD_PATH)/gpos/build/install/$(prefix)
@@ -71,9 +65,6 @@ LIBGPOPT_DIR = $(abs_top_builddir)/src/backend/gpopt/build/install/$(prefix)
 BLD_FLAGS = $(ARCH_FLAGS) -D$(ARCH_BIT) -D$(ARCH_CPU) -D$(ARCH_OS) $(GPOPT_flags)
 override CPPFLAGS := -fPIC $(CPPFLAGS)
 override CPPFLAGS := $(BLD_FLAGS)  $(CPPFLAGS)
-override CPPFLAGS := -DGPOS_VERSION=\"$(LIBGPOS_VER)\" $(CPPFLAGS)
-override CPPFLAGS := -DGPOPT_VERSION=\"$(OPTIMIZER_VER)\" $(CPPFLAGS)
-override CPPFLAGS := -DXERCES_VERSION=\"$(XERCES_VER)\" $(CPPFLAGS)
 override CPPFLAGS := -I $(LIBGPOS_DIR)/include $(CPPFLAGS)
 override CPPFLAGS := -I $(LIBXERCES_DIR)/include $(CPPFLAGS)
 override CPPFLAGS := -I $(LIBGPOPT_DIR)/include $(CPPFLAGS)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/78c27665/src/backend/gpopt/ivy-build.xml
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/ivy-build.xml b/src/backend/gpopt/ivy-build.xml
deleted file mode 100644
index 90bee25..0000000
--- a/src/backend/gpopt/ivy-build.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version='1.0'?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project name="cdb3" default="resolve" xmlns:ivy="antlib:org.apache.ivy.ant">
-
-  <!-- ================================================================ -->
-  <!-- This file is used to support retrieving the appropriate Pivotal  -->
-  <!-- Optimizer versioned files (header and libraries).  It is only    -->
-  <!-- used for commercial builds and can otherwise be ignored.         -->
-  <!-- ================================================================ -->
-
-  <target name="resolve" if="BLD_ARCH">
-    <ivy:settings file="${BLD_TOP}/build-utils/dependencies/ivysettings.xml"/>
-    <ivy:resolve conf="${BLD_ARCH}"
-                 log="download-only"/>
-  </target>
-
-  <target name="clean">
-    <ivy:cleancache />
-  </target>
-
-
-  <target name="post-resolve-trigger">
-    <echo>
-      ======================================================================
-        Post Resolve Trigger
-      ======================================================================
-      
-      organisation=${dep.organisation}
-      module=${dep.module}
-      revision=${dep.revision}
-      platform=${BLD_ARCH}      
-
-    </echo>
-
-   <exec executable="${BLD_TOP}/build-utils/dependencies/ivy.sh">
-    <arg value="${dep.module}"/>
-    <arg value="${dep.revision}"/>
-    <arg value="${dep.organisation}"/>
-    <arg value="${BLD_ARCH}"/>
-  </exec>
-
-  </target>
-
-  <target name="download-untar-trigger">
-    <echo>
-======================================================================
-  Post download artifact
-======================================================================
-    organisation=${dep.organisation}
-    module=${dep.module}
-    revision=${dep.revision}
-    artifact=${dep.artifact}
-    origin=${dep.origin}
-    local=${dep.local}
-    size=${dep.size}</echo>
-
-  <exec executable="${BLD_TOP}/build-utils/dependencies/ivy_util.sh">
-    <arg value="${dep.file}"/>
-    <arg value="${dep.revision}"/>
-  </exec>
-
-   <exec executable="${BLD_TOP}/build-utils/dependencies/ivy.sh">
-    <arg value="${dep.module}"/>
-    <arg value="${dep.revision}"/>
-    <arg value="${dep.organisation}"/>
-    <arg value="${BLD_ARCH}"/>
-  </exec>
-
-  </target>
-  
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/78c27665/src/backend/gpopt/ivy.xml
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/ivy.xml b/src/backend/gpopt/ivy.xml
deleted file mode 100644
index 045c717..0000000
--- a/src/backend/gpopt/ivy.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version='1.0'?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<ivy-module version="2.0">
-    <info organisation="Pivotal"
-          module="hawq" />
-
-    <!-- ================================================================ -->
-    <!-- This file is used to support retrieving the appropriate Pivotal  -->
-    <!-- Optimizer versioned files (header and libraries).  It is only    -->
-    <!-- used for commercial builds and can otherwise be ignored.         -->
-    <!-- ================================================================ -->
-
-    <configurations>
-      <conf name="osx105_x86"    description="osx105_x86"    visibility="public"/>
-      <conf name="osx106_x86"    description="osx106_x86"    visibility="public"/>
-      <conf name="osx106_x86_32" description="osx106_x86_32" visibility="public"/>
-      <conf name="rhel5_x86_64"  description="rhel5_x86_64"  visibility="public"/>
-      <conf name="rhel6_x86_64"  description="rhel6_x86_64"  visibility="public"/>
-      <conf name="suse10_x86_64" description="suse10_x86_64" visibility="public"/>
-    </configurations>
-
-    <dependencies>
-      <dependency org="emc"             name="optimizer"       rev="1.638"          conf="osx106_x86->osx106_x86_32;osx106_x86_32->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64"
/>
-      <dependency org="emc"             name="libgpos"         rev="1.137"          conf="osx106_x86->osx106_x86_32;osx106_x86_32->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64"
/>
-      <dependency org="xerces"          name="xerces-c"        rev="3.1.1-p1"       conf="osx106_x86->osx106_x86_32;osx106_x86_32->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64"
/>
-    </dependencies>
-</ivy-module>

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/78c27665/src/backend/gpopt/utils/funcs.cpp
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/utils/funcs.cpp b/src/backend/gpopt/utils/funcs.cpp
index 78f521b..9a901d0 100644
--- a/src/backend/gpopt/utils/funcs.cpp
+++ b/src/backend/gpopt/utils/funcs.cpp
@@ -41,6 +41,10 @@
 #include "gpos/io/CFileWriter.h"
 #include "gpopt/gpdbwrappers.h"
 
+#include "gpos/version.h"
+#include "gpopt/version.h"
+#include "xercesc/util/XercesVersion.hpp"
+
 extern "C" {
 
 PG_MODULE_MAGIC_CPP;
@@ -1060,9 +1064,9 @@ LibraryVersion()
 {
 	StringInfoData str;
 	initStringInfo(&str);
-	appendStringInfo(&str, "GPOPT version: %s", GPOPT_VERSION);
-	appendStringInfo(&str, ", GPOS version: %s", GPOS_VERSION);
-	appendStringInfo(&str, ", Xerces version: %s", XERCES_VERSION);
+	appendStringInfo(&str, "GPOPT version: %d.%d", GPORCA_VERSION_MAJOR, GPORCA_VERSION_MINOR);
+	appendStringInfo(&str, ", GPOS version: %d.%d", GPOS_VERSION_MAJOR, GPOS_VERSION_MINOR);
+	appendStringInfo(&str, ", Xerces version: %s", XERCES_FULLVERSIONDOT);
 	text *result = stringToText(str.data);
 
 	PG_RETURN_TEXT_P(result);
@@ -1074,7 +1078,7 @@ StringInfo
 OptVersion()
 {
 	StringInfo str = gpdb::SiMakeStringInfo();
-	appendStringInfo(str, "%s", GPOPT_VERSION);
+	appendStringInfo(str, "%d.%d", GPORCA_VERSION_MAJOR, GPORCA_VERSION_MINOR);
 
 	return str;
 }


Mime
View raw message