LArSoft

Logo

Software for Liquid Argon time projection chambers

View My GitHub Profile

What to do when there is a new release

Conventions used in this document:
NEW_RELEASE_VERSION - new release version (e.g., v03_00_00)
OLD_RELEASE_VERSION - the version of whatever release is currently setup
TOP_PRODUCT - generally this is larsoft, lbnecode, etc.
QUALIFIERS - qualifiers associated with the TOP_PRODUCT
WORKING_DIRECTORY - directory where you ran the mrb newDev command

Reference Documentation

mrb - the multi-repository build tool
UPS - Unix Product Support

Preliminaries

  1. type “ups active” to see what is in your current environment
    • check for the version and qualifiers used by your TOP_PRODUCT here
  2. type “unsetup_all” and reestablish your basic working environment
  3. If at all possible, simply logout and start from a fresh login

Using a new release with your existing source code directory

When a new LArSoft release is available and you want to develop against the new LArSoft release

  1. Start from a fresh login and establish your basic working environment.
  2. To check the list of available larsoft releases: ups list -aK+ larsoft
  3. Make a new local products area for this release: cd WORKING_DIRECTORY mrb newDev -p -v NEW_RELEASE_VERSION -q QUALIFIERS #this creates a new localProducts_XXXX directory using the new larsoft release and the existing srcs directory source localProducts_XXXX/setup
    #make sure to use the new localProducts directory, you may wish to delete the old directory
  4. Now deal with the code:
    • If you are working on the develop branch: cd srcs/ git checkout develop git pull
    • If you are working on a feature branch: cd srcs/ git checkout develop git pull git checkout feature/ git merge develop
    • Repeat for each repository in $MRB_SOURCE
    • mrb uv larsoft NEW_RELEASE_VERSION
  5. Resolving conflicts
    • git is very good about telling you how to resolve a conflict, please read the onscreen instructions
    • in particular, if you get lost, git status usually explains what is left to do, and how to do that
  6. Check the required code changes, if any; these are called “breaking changes” and they are documented in our Breaking Changes wiki page. You may need to write update scripts and/or apply changes manually.
  7. Make a clean build: cd $MRB_BUILDDIR mrb z mrbsetenv mrb i -jN #rebuild

Getting more information

  1. To see a list of lar packages in a given larsoft release:
    • setup larsoft -v RELEASE_VERSION -q QUALIFIERS
    • cat $LARSOFT_DIR/releaseDB/product_list
    • This feature has been available since larsoft v03_03_00
  2. To see the complete set of dependencies:
    • ups depend larsoft -v RELEASE_VERSION -q QUALIFIERS

Other use cases

You have no checked out code

This is the simplest possible case. We suggest that you start from a fresh login.

  1. setup TOP_PRODUCT NEW_RELEASE_VERSION -q QUALIFIERS
  2. See Quick links for experiment-specific instructions on getting started

Updating your own package

  1. Change the dependencies (larsoft and any other package that is explicitly listed in ups/product_deps) mrb uv larsoft NEW_RELEASE_VERSION mrb uv product version

Your experiment repository/feature branch is not ready yet for the latest LArSoft release

This is the scenario:

Following the guide above may very well be all you need to do: you’ll get to work with the latest LArSoft (v07_09_00) and with an sbndcode that is the latest available (develop based officially on LArSoft v07_08_00), tweaked to work with the latest LArSoft.
But if there are breaking changes of any type between LArSift v07_08_00 and v07_09_00, it might not work!
If the breaking changes pertain directly your code, you’d better bite it and fix them now following the release notes and the breaking changes instructions.
If instead the issues are not in your code, you may either fix the repository code (that is, the whole sbndcode) for your collaboration, and make the fix available to your release manager as a feature branch (not including your personal code changed); or let the collaboration take care of that.
If you opt for the latter, in the meanwhile you need to:

If cetpkgsupport was updated

Or what to do when you see errors like this:

mrbsetenv 
The working build directory is /scratch/garren/larsoft/v04_03_02/p/build_slf6.x86_64
The source code directory is /home/garren/scratch/larsoft/v04_03_02/srcs
----------- check this block for errors -----------------------
ERROR: Version conflict -- dependency tree requires versions conflicting with current setup of product : full descriptions cetpkgsupport v1_08_04 -f NULL -z /products vs cetpkgsupport v1_08_05 -f NULL -z /products
ERROR: Version conflict -- dependency tree requires versions conflicting with current setup of product cetpkgsupport: version v1_08_05 vs v1_08_04
ERROR: Version conflict -- dependency tree requires versions conflicting with current setup of product : full descriptions cetpkgsupport v1_08_04 -f NULL -z /products vs cetpkgsupport v1_08_05 -f NULL -z /products
ERROR: Version conflict -- dependency tree requires versions conflicting with current setup of product : full descriptions cetpkgsupport v1_08_04 -f NULL -z /products vs cetpkgsupport v1_08_05 -f NULL -z /products

The default release of cetpkgsupport changes from time to time.
The solution is simply to unsetup cetpkgsupport and rerun the command.

unsetup cetpkgsupport