Draft: cpack fix for analysis
This MR should in principle solve the issue encountered when using for instance the prun
command with code compiled by analyzers.
With the recent changes !1009 (merged) concerning cpack
, it was found that the tarball is empty and not containing anymore the code from the analyzer build
directory when submitting for instance jobs to the grid with the prun command (which behind the scene calls cpack
to build the tarball).
The reason is that the cpack_install.sh
script (which is a copy of the cpack_install.sh.in
) is now only called if the analyzer code was compiled with ATLAS_USE_CUSTOM_CPACK_INSTALL_SCRIPT
set to to TRUE
.
However, for analyses (i.e. all compilation not related to releases) ATLAS_USE_CUSTOM_CPACK_INSTALL_SCRIPT
is set to FALSE
(see athena!61972 (diffs)) as we would like to use a "cpack
install script" that would not hide errors but instead would fail on errors.
The cpack_install.sh
script cannot be use because it is hiding the errors.
In this MR 2 new script are precisely introduced to tackle that issue and to fail if an error occurs while including the code from the build
directory to the tarball. Those script are
-
cpack_install_failingOnErrors.sh.in
which is almost the copy of thecpack_install.sh.in
-
cpack_dbg_install_failingOnErrors.sh.in
which is almost the copy ofcpack_dbg_install.sh.in
The only change being the call of set -e
instead of set +e
.
Unfortunately, I could not test the changes myself because of my limited knowledge about including an external package and test it with AnalysisBase
.
I though manage to compile the current changes building AnalysisBaseExternals
as a standalone project doing
CMAKE_VERSION="3.18.3"
GIT_VERSION="default"
PROJECT_NAME="AnalysisBaseExternals"
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
set +e
source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh -2
asetup none,centos7,gcc8
lsetup "cmake ${CMAKE_VERSION}"
lsetup "git ${GIT_VERSION}"
set -e
export LC_ALL=en_US.utf8
cmake -DCMAKE_BUILD_TYPE=Release -DCTEST_USE_LAUNCHERS=TRUE -S ./atlasexternals/Projects/${PROJECT_NAME} -B ./buildExt
cmake --build ./buildExt
DESTDIR=./installExt cmake --install ./buildExt