How to release a package

( Document last updated  11 April 2006 by Marco Cattaneo )

This page tries to explain the various steps to put properly in CVS/CMT a modified version of a package. In order to facilitate the description, suppose you have modified the package hat/my_pack from version v2r1. Your new version is in the directory ~/cmtuser/hat/my_pack/v2r1 .

Before changing any released package, you should discuss the changes with the package owner (whose name usually appears in the cmt/requirements and doc/release.notes files). It is usually a good idea to inform the appropriate mailing list of the planned changes.

1- Decide what will be the new version number.

If your changes are only bug fixes or minor changes, just increment the "r" part. In our case, it becomes v2r2. If the changes are more important, you may want to start a new major version, in our case it becomes v3r0. As version matching in the requirement files handles a bit differently minor and major version number, think a bit before changing the major version number. Check with the librarian if in doubt... We will continue this description with v2r2.
> cd ~/cmtuser/hat/my_pack
> mv v2r1 v2r2

2- Produce the required information

You need to update the cmt/requirements file with the new version number, and any change in the dependency of the package.

You must also update the file doc/release.notes describing your changes to the package. You should add a concise but meaningful comment describing your changes (just putting "bug fix" is not sufficient!). This should be added at the top of the release.notes file, just after the header describing the package. Please preserve the format: "!" followed by the date, followed by your name, then on a new line " -" followed by the comment. If you have made several changes, make several bullets, always starting with " -". Please keep the lines short (max 80 characters), start a new line if necessary. Note that if you are editing this file with Emacs, using the LHCb customisation, you can use the "Insert" key to correctly format the file

3- Remove tag and Check what CVS will do

> cd ~/cmtuser/hat/my_pack/v2r2
> cvs update -A

This will list the actions that CVS will perform, identifying your modifications with M, the new files with ?, the files changed on the CVS repository since your last checkout with U, the files changed on the CVS repository and modified by you with C, indicating lost files.

4- Remove any C in front of a file

C in front of a file means that several people are working on the same package so be careful: CVS has tried to merge your modifications with the changes already done and it has NOT succeeded:

>cd ~cmtuser/hat/my_pack/v2r2/src
> emacs mychangedfile.cpp
   CVS marks with >>>>> and <<<<<<<< regions which have been modified twice , you have to understand and clean the file.
> cvs update
C is replaced with M

5- Remove any ? in source directories

> cd ~/cmtuser/hat/my_pack/v2r2/src
> cvs add mynewfile.cpp mynewfile.h .etc...
> cvs update
   ?
are replaced with A

do not add any file in the cmt/ directory, or any copy of a file that should not be kept (e.g. files whose name ends with "~")

6- Tell CVS to remove from the repository the files you have deleted if any

> cd ~cmtuser/hat/my_pack/v2r2/src
> cvs rm oldfile.cpp
> cvs update
  the comment mentioning a lost file is replaced with R

7- Commit your changes

> cd ~cmtuser/hat/my_pack/v2r2
> cvs commit -m "v2r2 - small comment for this release" .

9- Inform the librarian

Your new version must now be put in an official release, this requires some work by the librarian. Send him/her a mail.