Next: 13.1 Removing patches
Up: MOLPRO Programming Manual
Previous: 12 Interfacing a new
The command
buildpatch [options] configfile [version]
constructs a patch file, which consists of a shell script
which will apply a patch to a Molpro distribution directory.
options can contain zero or more of the following.
- -compress
- the resulting patch file is compressed using gzip.
(default)
- -nocompress
- the resulting patch file is not compressed.
- -headers
- file patch history headers are updated to include this patch.
(default)
- -noheaders
- file patch history headers are not updated.
version, if present, gives a version number that overrides that
contained in the patch definition file.
The file configfile defines what should go in the patch.
It consists of a number of stanzas (order immaterial) of the form
type
contents (may be more than one line)
<blank line>
The stanzas which must be presented together with their definitions are:
- TYPE
- CONTENTS
- name
- Unique name by which the patch will be known.
- author
- Name of author
- readme
- A paragraph describing the function of the patch
- status
- A single word describing the status of the patch (possible values:
recommended provisional developer; default: recommended)
- version
- Molpro version number
- files
- files which are to be added in this patch. Each line defines a file,
and consists of a pair of file names: the first is the local file name
specifying where the patched file is now (relative or absolute path),
and the second is the path name relative to the top level (eg 2000.1)
where the file is to be placed in the Molpro distribution. If the
last character of the latter is /, it will be assumed to be a directory
name, and the file name will be taken from the first field.
- delobj
- list of object files which should be deleted from the library
lib/libmolpro.a. This list does not need to include any of the source
files included in the patch, since the corresponding objects will
be rebuilt automatically. Thus this stanza will usually be empty.
- delete
- list of files which are to be deleted by this patch. They should be
specified as pathnames relative to the top level directory.
- command
- arbitrary shell commands which will be executed at the end of the
patch installation in the top level Molpro directory. This facility
should be used with care, since inappropriate irreversible commands
may render the patch reversion mechanism unusable.
- prereq
- names of any patches which are prerequisites to this one. Once the
patch has been installed, reversion of all the prerequisites is
disabled. Prerequisite patches will be applied automatically if
necessary, and if they can be found in the same directory as the
patch being applied.
- supercede
- names of any patches which this one supercedes. At installation,
these patches, if present, will be unapplied.
- conflict
- names of any patches which conflict with this one. Normally it will
not be necessary to specify this, since at patch installation time,
any files which are in common between this patch and any previously
applied will generate an error.
- require
- names of any files or directories which must be present for this
patch to be applied. If any of the files is not present, the patch
will be ignored.
Any stanzas which are missing will be assumed to be empty.
The resulting patch file will be named version.name, and can be applied
to any Molpro distribution at the correct version level by changing to
the top-level Molpro directory, and passing the patch file to /bin/sh.
The source for the patch can be recreated by giving a directory name as
parameter to the patch file when it is run; there is then no need to be
in a Molpro directory, but rather the files making up the patch will simply
be stored flat in the directory specified. This provides a mechanism for
unwrapping the contents of a patch without applying the patch to a live
version. At present, unfortunately, this mechanism will fall down if there
are two files with the same name in different directories; furthermore,
if the list specified in the files stanza is anything other than a simple
mapping of directory names from . to the correct place in the distribution,
then the patch definition file will also need editing before reuse.
A skeleton configuration file can be generated using the makepatchdef
interactive script, which prompts for the essential information.
In the MOLPRO environment, those who are authorised can safely deposit
the completed patch file on the central server by using the depositpatch
script. Note that the action of this script is irreversible; to prevent
inappropriate and chaotic changes of mind, if a patch which has been committed
to the server is found to contain errors, a new superceding patch should be
prepared. depositpatch automatically removes from view all patches which
have been superceded by the one being deposited.
Subsections
Next: 13.1 Removing patches
Up: MOLPRO Programming Manual
Previous: 12 Interfacing a new
P.J. Knowles and H.-J. Werner
molpro-support@tc.bham.ac.uk
Jan 10, 2000