glastpack Reference

Written in PERL, the GLAST package management tool glastpack is a straight forward,
command line utility that eases the complexity of using CMT by providing a facility to
create and use "work areas". A glastpack work area is simply a directory with a group
of packages and is populated using glastpack commands.

Notes:

  • Unix Commands. glastpack also encapsulates the Unix commands necessary for
    setting the CMTPATH, doing runtime configuration, and launching builds.
  • To see a list of all available glastpack commands, from the command line, enter:

    glastpack.pl

  • To get details about a particular glastpack command, enter:

    glastpack.pl [name of command]


Summary:

create dirname
help command
build package
[-H] rco package version
soap port
run package executable
add /path/to/area
rebuild package
remove /path/to/area
co package version
login
logout

Result of "perldoc":

NAME

glastpack.pl - glast package management

$GLASTROOT/ground/scripts/glastpack.pl

SYNOPSIS

  • glastpack provides a facility for a developer to use "work areas" for development.
  • It provides a functional recursive checkout. CMT does not look at the packages present
    in the CMTPATH before checkout, glastpack.pl does and will only retrieve packages it
    needs.
  • Any wildcards in the requirements file for a package are resolved to the latest matching
    tag.

USAGE

$ glastpack.pl create dirname creates the working area "dirname"
$ cd dirname; glastpack.pl login login to the working area
$ glastpack.pl add /path/to/packages add path to CMTPATH
$ glastpack.pl remove /path/to/packages remove path from CMTPATH
$ glastpack.pl rco package version recursive checkout of package, version
$ glastpack.pl co package version checkout package, version
$ glastpack.pl build package compile package, version
$ glastpack.pl run package executable configure and run the executable from package, version

CMTPATH

Inside your working directory you will find a file named "CMTPATH". This file has the syntax of the CMT .cmtrc file, and must be edited to reflect your environment. Add paths to other working areas and packages here.

Note: The first entry in the CMTPATH is automatically set as the path to the work area you have created. You can append as many other paths as you like, but this path must remain first.

EXAMPLE 1: Check out GaudiSys v9r0p5 and Gleam v1r0 into seperate work directories and then compile Gleam against GaudiSys.

$ mkdir /tmp/GLAST;cd /tmp/GLAST

$ glastpack.pl create GaudiSys_v9r0p5
# create Gaudi work area

$ cd GaudiSys_v9r0p5; glastpack.pl login
# "login" to GaudiSYS

$ glastpack.pl rco GaudiSys v9r0p5
# check out GaudiSys v9r0p5

$ glastpack.pl build GaudiSys
# build GaudiSys

$ cd /tmp/GLAST

$ glastpack.pl create Gleam_v1r0
# create Gleam work area

$ cd Gleam_v1r0; glastpack.pl login

$ glastpack.pl add /tmp/GLAST/GaudiSys_v9r0p5
# add GaudiSys to CMTPATH

$ glastpack.pl rco Gleam v1r0
# check out Gleam against GaudiSys

$ glastpack.pl build Gleam
# compile Gleam

$ glastpack.pl run G4Generator G4Test.exe
# run G4Test

EXAMPLE 2: Check out the HEAD of Gleam against a prior installed Gleam and GaudiSys.

$ glastpack.pl create work
# create work dir

$ cd work; glastpack.pl login
# "login" to work

$ glastpack.pl add $GLASTROOT/ground/releases/GaudiSys_v9r0p4/

$ glastpack.pl add $GLASTROOT/ground/releases/Gleam_v0r7/
# add older GaudiSys and Gleam to CMTPATH

$ glastpack.pl rco Gleam HEAD
# check out the head of Gleam against CMTPATH
getting Gleam HEAD
6 more packages needed:

facilities v2r3
xmlGeoDbs v1r4
GlastEvent v7r0
G4Generator v3r3p2
GlastDigi v2r4
Recon v0r8p2

getting facilities v2r3
getting xmlGeoDbs v1r4
getting GlastEvent v7r0
getting G4Generator v3r3p2
getting GlastDigi v2

done.

 

Related Topics


By Alex Schlessinger

Last updated by: Chuck Patterson 12/13/2005