Assorted SCRAM Widsom
Here are some things you might end up doing with SCRAM that are not so easy to grok by reading the SCRAM manual. By the way, the manual for version 0.20 can be found at http://spi.cern.ch/cgi-bin/scrampage.cgi.
- How to check out an entire package: like everything, not just the skeleton with no source code. This is useful/necessary if you have to make a modification and recompile everything. Here is the example of OSCAR if your shell is bash.
export SCRAM_ARCH=slc3_ia32_gcc323
scram project OSCAR OSCAR_3_6_5
cd OSCAR_3_6_5
eval $(scram runtime -sh)
cmscvsroot OSCAR
cvs login (password: 98passwd)
cvs co -d src -r OSCAR_3_6_5 OSCAR
cd src
scram b
This checks out the tagged version of OSCAR called OSCAR_3_6_5. If you want the head of the repository for some reason, omit this revision tag name.
- How to tell some project to use a different external package: For example, how to tell OSCAR to use a different Geometry that you have checked out into your home area instead of using the default one in the distro.
scram project OSCAR OSCAR_3_6_5Then answer the question about the GEOMETRY_BASE pointing it to your local directory ~/Geometry_1_13_2. This will actually modify the magic/secret files in OSCAR_3_6_5/.SCRAM so that you don't have to do this again (I think).
scram project Geometry Geometry_1_13_2
cd Geometry_1_13_2
cmscvsroot Geometry
cvs login (password = 98passwd)
cvs co -d src -r Geometry_1_13_2 Geometry
eval $(scram runtime -sh)
cd src
scram b lib
cd ~/OSCAR_3_6_5
eval $(scram runtime -sh)
scram setup -i geometry
Then you have to edit OSCAR_3_6_5/.SCRAM/slc3_ia32_gcc323/geometry_Geometry_1_13_2.dat by hand so that the geometry path includes OSCAR before Geometry. (Nice design, eh?) This line should look like:
Geometry_PATH:.:/opt/cms/Releases/OSCAR/OSCAR_3_6_5/src/Data:/home/aarond/Geometry_1_13_2/src:runtime_path