mkLCGCMTtar Overview
mkLCGCMTtar
creates a tar files with all LCG packages required by a given Gaudi version for a given platform.
- the script is using /tmp as intermediate storage space, a lot is required so do not run it on lxbuild.
- the list of external packages required by a given version of a PROJECT (usually GAUDI) is retrieved from the list of native_versions recognized by the PROJECT
- the list of externals, not used directly by the PROJECT, must be append at the end of the ProjectSys (usually GaudiRelease) requirements file with a LHCb or LHCbGrid tag.
- CMTPROJECTPATH must be set beforehand if the PROJECT is built with InstallArea.
Usage
def help() :
print """make a LCGCMT tar file for a given Gaudi version with the necessary libraries\n
Usage:
python mkLCGCMTtar.py -n -b [-d or --debug] [--plugins]\n
-d - debug mode \n
-b or --binary= <binary> - for this binary platform \n
-n or --native= <Lb project_vers> - application version from where to get native.versions \n
--plugins - if there: build a PLUGINS tar file \n
Examples:
cd $LHCBTAR/source
python mkLCGCMTtar.py --native=GAUDI_<version> --binary=slc3_ia32_gcc323 \n
gets the libraries used by GAUDI_<version> from $LCG_release_area/LCGCMT/LCGCMT_version used by Gaudi>\n
python mkLCGCMTtar.py --plugins \n
"""
sys.exit()
Full description
- main gets the arguments from the command line, retreives the list of native_versions, gets corresponding tar files and buids the final LCGCMT_<version>_<binary>.tar.gz file.
- get_native_versions
- retreive the CMTPATH value either from <version>Env package or with CMTPROJECTPATH
- get the LCGCMT version from CMTPATH
- write the full list of native_versions, depending on the required binary, on a temporary file
- on win32 : add LHCb and WIN32 tags
- on slc3 : add LHCb, LHCbGrid,slc3 tags
- on slc4 : add LHCb, LHCbGrid tags
- build a packages_versions dictionary: {pack,version}
- remove the temporary file
- get_tar_files
- build a temporary tree in /tmp: LCGCMT_<lcg_version>:/<binary>/external
- for every package in packages_versions dictionary
- get the tar file name from get_tar_name
- get_tar_name tries to get tar files from LCG tar files distribution
- LCG packages and ROOT are taken in debug mode
- AIDA exists only in share mode
- checks that the tarfile exists, if not checks with package name in lower case
- if tar file exists returns tarfile name and binary for this tarfile otherwise returns None
- if tarfile name is None tries to find a private tar file from $LHCBTAR/source
- if there is none : fill the missing dictionary with {pack:version}
- if tarfile exists:
- untar it in the temporary directory * in case of error: fill the tarko dictionary with {pack:version}
- replace old slc4_ia32_gcc345 binary name with slc4_ia32_gcc34 if any
- remove doc , test , tests , examples , tutorial directories
- remove softlinks which cannot be resolved (cernlib/2005)
- clean_clhep_dir : keep only required libraries
- make the final tar file from /tmp/LCGCMT_<lcg_version>/lt&;binary>/external
- if OK:
- remove temporary tree and print a message
- if not OK:
- print missing and tarko dictionaries
- does not remove temporary tree
--
FlorenceRanjard - 30 Mar 2007