Check size of visit_dist_data.tar.xz before deciding to untar.
* Check size of visit_dist_data.tar.xz before deciding to untar.
Prevent untar failure during build_visit with the file is the lfs'd version not the real one.
* Update src/tools/data/datagen/CMakeLists.txt
#
# Mark C. Miller, Wed Mar 23 21:12:34 PDT 2022
# Elim use of 7z in favor of vanilla tar
+#
+# Kathleen Biagas, Fri Mar 25 11:41:48 PDT 2022
+# Test the size of visit_dist_data.tar.xz to ensure its the real one
+# and not the lfs'd version. Otherwise untar will fail.
+#
#****************************************************************************
MESSAGE(STATUS "Configuring VisIt Data Generation Targets")
@@ -375,7 +380,20 @@ endif()
# Add install command for contents of "data"
#-----------------------------------------------------------------------------
-IF(EXISTS ${VISIT_SOURCE_DIR}/../data/visit_dist_data.tar.xz)
+set(USE_VISIT_DIST_DATA_TARBALL false)
+
+if(EXISTS ${VISIT_SOURCE_DIR}/../data/visit_dist_data.tar.xz)
+ # Need to test the size of visit_dist_data, because untar will fail if
+ # its the lfs'd version of the file and not the real one. This happens
+ # with build_visit, because lfs content isn't pulled.
+
+ file(SIZE ${VISIT_SOURCE_DIR}/../data/visit_dist_data.tar.xz VDD_SIZE)
+ if(VDD_SIZE GREATER 200) # lfs'd files are generally ~130 bytes.
+ set(USE_VISIT_DIST_DATA_TARBALL true)
+ endif()
+endif()
+
+IF(USE_VISIT_DIST_DATA_TARBALL)
SET(DIST_UNTAR_CMD "${TAR_CMD} ${UNTAR_ARGS} ${VISIT_SOURCE_DIR}/../data/visit_dist_data.tar.xz")
INSTALL(CODE "execute_process(COMMAND ${DIST_UNTAR_CMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )")
INSTALL(
