Next: A..3.10 Installation of documentation Up: A..3 Installation from source Previous: A..3.8 Installing the program

A..3.9 Getting and applying patches

Normally, the distribution when downloaded is fully up to date, and initial patching is not necessary. However, bug fixes and updates may be desired subsequently. The mechanism for updating MOLPRO source code with bug fixes and new features is through the provision of self-contained patch files, which, when applied, replace or add files, and store the replaced code in order to allow later reversion to the original. Those patches that are available can be seen at http://www.tc.bham.ac.uk/molpro/patch/2002.1 , whilst a list of those already installed is printed when running the program. Patch files automatically outdate any targets that need rebuilding as a result of the patch; for example, relevant object files are removed. Thus, after all patches have been applied, it is usually necessary to rebuild the program using make.

The order in which patches are applied and removed is important. Some patches are prerequisites of others, and some patches are 'parents' of one or more 'children': the parent and child patches have one or more files in common, but the parent is older than the child. Individual patch scripts will themselves refuse to apply or revert if rules based on these considerations would be violated. In order to deal with this issue smoothly, a program patcher is provided to manage the application and removal of one or more patches. patcher attempts to sort the order in which patches are applied or reverted so as to avoid such conflicts; it will also, if necessary, revert and reapply patches. In the top-level directory, one issues the command

./patcher  [--apply | --revert | --list]
           [--cache-directory] [--user] [--password]
           [--url] [--local]
           [--verbose] [--no-action] patch1 patch2 ....

It can operate in one of three possible modes according to the options

-apply, -a
(default) Apply (i.e. install) patches
-revert, -r
Revert (i.e. remove) patches
-list, -l
List available and installed patches

The list of patches to remove or install can be given on the command line after all options as an explicit list of either patch names or, in the case of application, patch files. Alternatively and usually, for the case of application, one can through options request either all patches that are in a local cache, or all patches that are available.

The MOLPRO patches from the central web server (default http://www.tc.bham.ac.uk/molpro), are cached by this program in a local directory (default $HOME/.molpro/cache). Access to the web server typically has to be authenticated; the first time you run this program, you can specify your username and password through command-line options, or else the program will prompt for them. They are then remembered in the file CONFIG in the cache directory.

In case of problems, first consult the file patcher.log, which contains the output from individual patch applications and reversions.

The following options can be given.

-cache-directory, -c d
location of cache directory.

-verbose, -v
Increase amount of information printed. Multiple -verbose options can be used.
-noverbose
Decrease amount of information printed.

-url
URL of web server.
-user, -u u
Username for web server.
-password, -p p
Password for web server.

-noaction, -n
No applications or reversions are actually done. Useful for seeing what would happen without doing it.

-local
Don't attempt to access the web server, but use only local files.

Examples:

patcher
Applies all patches that are available, but not yet installed. This is the normal use of the utility in bringing the copy of the source tree up to date with all available updates.

patcher -l
Lists installed and available patches.

patcher -r xx yy
Reverts patches xx and yy.

patcher -n
Loads all uninstalled patches into the cache for later use.
patcher --local
Applies all patches in the cache; no network connection needed.



Next: A..3.10 Installation of documentation Up: A..3 Installation from source Previous: A..3.8 Installing the program

P.J. Knowles and H.-J. Werner
molpro@tc.bham.ac.uk
Jan 15, 2002