Merge remote-tracking branch 'omaha/omaha_16.2.1' into master_16.2.1
Former-commit-id: 40594745087a6db80b50882b68c76b6bf9a17bd0
This commit is contained in:
commit
bb6f5af59a
4 changed files with 29 additions and 172 deletions
|
@ -76,7 +76,8 @@ import com.raytheon.viz.gfe.smarttool.script.SmartToolRunnerController;
|
|||
* Jul 23, 2015 4263 dgilling Support SmartToolMetadataManager.
|
||||
* Aug 27, 2015 4749 njensen Call shutdown() on PythonJobCoordinator
|
||||
* Sep 16, 2015 4871 randerso Return modified varDict from Tool
|
||||
* 10/08/2015 18125 bhunder Modified CANCEL_MSG_START to work with Jep updates
|
||||
* Oct 08, 2015 18125 bhunder Modified CANCEL_MSG_START to work with Jep updates
|
||||
* Apr 20, 2016 5593 randerso Fixed issue with running tool with no grids left parm immutable
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -435,37 +436,41 @@ public class Tool {
|
|||
|
||||
startedParmEdit = false;
|
||||
|
||||
// Determine the pre, execute, and post methods to call
|
||||
// If present, instantiate Tool class
|
||||
|
||||
// Check the tool modes to make sure they make sense
|
||||
|
||||
boolean saveParams = false;
|
||||
int numberOfGrids = 0;
|
||||
|
||||
try {
|
||||
/*
|
||||
* Make sure parm is mutable.
|
||||
*
|
||||
* This should be done first so saveMutableFlag is set before
|
||||
* cleanUp is run
|
||||
*/
|
||||
if (parmToEdit != null) {
|
||||
saveMutableFlag = this.inputParm.isMutable();
|
||||
this.inputParm.setMutable(true);
|
||||
}
|
||||
|
||||
/*
|
||||
* varDict must be set before returning from execute to prevent
|
||||
* errors attempting to retrieve the updated contents
|
||||
*/
|
||||
tool.setVarDict(varDict);
|
||||
|
||||
// Get the gridInventory for the timeRange
|
||||
IGridData[] grids = this.inputParm.getGridInventory(timeRange);
|
||||
if (grids.length == 0) {
|
||||
numberOfGrids = grids.length;
|
||||
if (numberOfGrids == 0) {
|
||||
String message = "Smart Tool " + toolName
|
||||
+ ": No Grids To Edit for "
|
||||
+ inputParm.expressionName();
|
||||
statusHandler.handle(Priority.EVENTA, message);
|
||||
return;
|
||||
}
|
||||
numberOfGrids = grids.length;
|
||||
|
||||
// Make sure parm is mutable
|
||||
if (parmToEdit != null) {
|
||||
saveMutableFlag = this.inputParm.isMutable();
|
||||
this.inputParm.setMutable(true);
|
||||
}
|
||||
|
||||
// Clear missing grids
|
||||
GridCycler.getInstance().clearMissingData();
|
||||
// # PreProcess Tool
|
||||
|
||||
// PreProcess Tool
|
||||
handlePreAndPostProcess("preProcessTool", null, timeRange,
|
||||
editArea, dataMode);
|
||||
statusHandler.handle(Priority.DEBUG, "Running smartTool: "
|
||||
|
@ -479,11 +484,6 @@ public class Tool {
|
|||
return;
|
||||
}
|
||||
|
||||
// # Show progress on a grid basis for numeric and parm-based
|
||||
// if toolType == "numeric" or toolType == "parm-based":
|
||||
// percent = (index+1)/numberOfGrids * 100.0
|
||||
// AFPS.ProgressBarMsg_send_mh(self.__msgHand, "SmartTool",
|
||||
// percent)
|
||||
if (!grid.isOkToEdit() && (parmToEdit != null)) {
|
||||
String message = "Smart Tool " + toolName
|
||||
+ ": Encountered locked grid. ";
|
||||
|
@ -558,7 +558,7 @@ public class Tool {
|
|||
}
|
||||
} // end of grids for loop
|
||||
|
||||
// # PostProcess Tool
|
||||
// PostProcess Tool
|
||||
handlePreAndPostProcess("postProcessTool", null, timeRange,
|
||||
trueEditArea, dataMode);
|
||||
saveParams = true;
|
||||
|
|
|
@ -213,39 +213,6 @@
|
|||
</java>
|
||||
</target>
|
||||
|
||||
<target name="buildHybrid" depends="clean">
|
||||
<echo message="feature=com.raytheon.uf.common.base.feature" />
|
||||
<java
|
||||
classname="org.eclipse.core.launcher.Main"
|
||||
fork="true"
|
||||
failonerror="true">
|
||||
|
||||
<arg value="-application" />
|
||||
<arg value="org.eclipse.ant.core.antRunner" />
|
||||
<arg value="-buildfile" />
|
||||
<arg value="${uframe.eclipse}/plugins/${pde.build.script}" />
|
||||
<arg value="-DbaseLocation=${uframe.eclipse}" />
|
||||
<arg value="-Dbuilder=${basedir}/edex" />
|
||||
<arg value="-DbuildDirectory=${basedir}/edex/tmp" />
|
||||
<arg value="-DtopLevelElementId=com.raytheon.uf.common.base.feature" />
|
||||
<arg value="-Dbase=${basedir}/edex" />
|
||||
<arg value="-Dconfigs=${build.os},${build.ws},${build.arch}" />
|
||||
|
||||
<arg value="-Dgenerate.p2.metadata=true" />
|
||||
<arg value="-Dp2.metadata.repo=file:/${basedir}/edex/postBuild/awips2/cave/.repository" />
|
||||
<arg value="-Dp2.artifact.repo=file:/${basedir}/edex/postBuild/awips2/cave/.repository" />
|
||||
<arg value="-Dp2.publish.artifacts=true" />
|
||||
<arg value="-DgenerateVersionsList=true" />
|
||||
|
||||
<classpath>
|
||||
<pathelement
|
||||
location="${uframe.eclipse}/plugins/${eclipse.launcher.jar}" />
|
||||
</classpath>
|
||||
</java>
|
||||
|
||||
<antcall target="clean" />
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<if>
|
||||
<available file="${basedir}/edex/includes"
|
||||
|
|
|
@ -27,7 +27,7 @@ requires: netcdf = 4.1.2
|
|||
requires: netcdf-devel = 4.1.2
|
||||
|
||||
%description
|
||||
AWIPS II Common Base - Contains common plugins utilized by both EDEX and CAVE.
|
||||
AWIPS II Common Base - Contains common plugins utilized by EDEX.
|
||||
|
||||
%prep
|
||||
# Ensure that a "buildroot" has been specified.
|
||||
|
@ -41,27 +41,23 @@ if [ -d %{_build_root} ]; then
|
|||
rm -rf %{_build_root}
|
||||
fi
|
||||
/bin/mkdir -p %{_build_root}
|
||||
#/bin/mkdir %{_build_root}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%build
|
||||
_hybrid_target=buildHybrid
|
||||
|
||||
_build_xml=build.xml
|
||||
BUILD_EDEX=%{_baseline_workspace}/build.edex
|
||||
EDEX_DIST=${BUILD_EDEX}/edex/dist
|
||||
|
||||
_pde_build_arch=x86
|
||||
if [ "%{_build_arch}" = "x86_64" ]; then
|
||||
_pde_build_arch=%{_build_arch}
|
||||
fi
|
||||
|
||||
cd ${BUILD_EDEX}
|
||||
/awips2/ant/bin/ant -f ${_build_xml} \
|
||||
-Dbuild.arch=${_pde_build_arch} \
|
||||
-Duframe.eclipse=%{_uframe_eclipse} ${_hybrid_target}
|
||||
-Dbuild.arch=x86_64 \
|
||||
-Dfeature=com.raytheon.uf.common.base.feature \
|
||||
-Duframe.eclipse=%{_uframe_eclipse} \
|
||||
clean \
|
||||
build \
|
||||
clean
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
@ -75,15 +71,6 @@ if [ $? -ne 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
RPMS_CORE=%{_baseline_workspace}/rpms/awips2.core
|
||||
RPMS_COMMON_BASE=${RPMS_CORE}/Installer.common-base
|
||||
SCRIPTS=${RPMS_COMMON_BASE}/scripts
|
||||
cp -vf ${RPMS_COMMON_BASE}/scripts/* %{_build_root}/awips2/cave
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
#create a list of all files packaged for /awips2/edex/data/utility
|
||||
UTILITY=/awips2/edex/data/utility
|
||||
if [ -d %{_build_root}/$UTILITY ]; then
|
||||
|
@ -120,29 +107,7 @@ else if [ $retVal -eq 0 ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# CAVE installed?
|
||||
|
||||
# when the plugins are for CAVE, we need to
|
||||
# use the p2 director to install from a repository.
|
||||
rpm -q awips2-cave > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
/bin/bash /awips2/cave/installCAVECommon.sh
|
||||
rm -f /awips2/cave/installCAVECommon.sh
|
||||
else
|
||||
# hide the cave repository
|
||||
pushd . > /dev/null 2>&1
|
||||
cd /awips2
|
||||
rm -rf .cave
|
||||
mv cave .cave
|
||||
popd > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
%preun
|
||||
if [ -d /awips2/.cave ]; then
|
||||
rm -rf /awips2/.cave
|
||||
fi
|
||||
if [ -d /awips2/.edex ]; then
|
||||
rm -rf /awips2/.edex
|
||||
fi
|
||||
|
@ -157,8 +122,3 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||
%dir /awips2
|
||||
%dir /awips2/edex
|
||||
/awips2/edex/*
|
||||
|
||||
%dir /awips2/cave
|
||||
/awips2/cave/*
|
||||
%dir /awips2/cave/.repository
|
||||
/awips2/cave/.repository/*
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Set all paths required by CAVE before installing.
|
||||
export LD_LIBRARY_PATH=/awips2/java/lib:/awips2/python/lib:$LD_LIBRARY_PATH
|
||||
export LD_PRELOAD=libpython.so
|
||||
if [ -d /awips2/cave/lib ]; then
|
||||
export LD_LIBRARY_PATH=/awips2/cave/lib/lib_illusion:$LD_LIBRARY_PATH
|
||||
fi
|
||||
if [ -d /awips2/cave/lib64 ]; then
|
||||
export LD_LIBRARY_PATH=/awips2/cave/lib64/lib_illusion:$LD_LIBRARY_PATH
|
||||
fi
|
||||
# Need to use awips2-java to do this.
|
||||
export PATH=/awips2/java/bin:/awips2/python/bin:${PATH}
|
||||
export JAVA_HOME="/awips2/java/jre"
|
||||
|
||||
# Set the CAVE logfile location.
|
||||
export LOGFILE_CAVE=/dev/null
|
||||
|
||||
# Use the eclipse p2 manager.
|
||||
CAVE_EXE="/awips2/cave/cave"
|
||||
NOSPLASH_ARG="-nosplash"
|
||||
DIRECTOR_APP="-application org.eclipse.equinox.p2.director"
|
||||
DESTINATION_ARG="-destination /awips2/cave"
|
||||
INSTALL_ARG="-i com.raytheon.uf.common.base.feature.feature.group"
|
||||
UNINSTALL_ARG="-u com.raytheon.uf.common.base.feature.feature.group"
|
||||
REPO="-repository file:/awips2/cave/.repository/"
|
||||
|
||||
COMMON_CMD="${CAVE_EXE} ${NOSPLASH_ARG} ${DIRECTOR_APP} ${DESTINATION_ARG}"
|
||||
INSTALL_CMD="${COMMON_CMD} ${INSTALL_ARG} ${REPO}"
|
||||
UNINSTALL_CMD="${COMMON_CMD} ${UNINSTALL_ARG}"
|
||||
|
||||
# Uninstall any existing components since the p2 director does not
|
||||
# support updating.
|
||||
# If the feature is not installed, this does not fail quietly.
|
||||
# Determine if the feature needs to be uninstalled.
|
||||
${UNINSTALL_CMD} -verifyOnly > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_TIMESTAMP=`date`
|
||||
echo "uninstall previous STARTED: ${LOG_TIMESTAMP}"
|
||||
${UNINSTALL_CMD}
|
||||
LOG_TIMESTAMP=`date`
|
||||
echo "uninstall previous COMPLETE: ${LOG_TIMESTAMP}"
|
||||
fi
|
||||
|
||||
# complete the install
|
||||
LOG_TIMESTAMP=`date`
|
||||
echo "installation STARTED: ${LOG_TIMESTAMP}"
|
||||
${INSTALL_CMD}
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
LOG_TIMESTAMP=`date`
|
||||
echo "installation COMPLETE: ${LOG_TIMESTAMP}"
|
||||
|
||||
# remove the repository
|
||||
if [ -f /awips2/cave/.repository/artifacts.xml ]; then
|
||||
rm -f /awips2/cave/.repository/artifacts.xml
|
||||
fi
|
||||
|
||||
if [ -f /awips2/cave/.repository/content.xml ]; then
|
||||
rm -f /awips2/cave/.repository/content.xml
|
||||
fi
|
||||
|
||||
if [ -d /awips2/cave/.repository/features ]; then
|
||||
rm -rf /awips2/cave/.repository/features
|
||||
fi
|
||||
|
||||
if [ -d /awips2/cave/.repository/plugins ]; then
|
||||
rm -rf /awips2/cave/.repository/plugins
|
||||
fi
|
Loading…
Add table
Reference in a new issue