NAME

patchaperlup - apply a couple of patches in a perl source directory

SYNOPSIS

patchaperlup --perldir perldir
             --diffdir diffdir
             [ --start patch-number ]
             [ --upto  patch-number ]
             [ --quiet ]
             [ --version ]

DESCRIPTION

This utility runs a batch of jobs that upgrade an arbitrary source snapshot of perl with selected numbered patches to produce another snapshot of perl. It is designed to be called from other utilities (such as apc-buildaperl) that implement a source repository in the broader sense.

How to get at perl patches is described in the perlhack manpage.

When you have unpacked a perl source tarball or otherwise produced a source snapshot, patchaperlup should be run as

perl patchaperlup --perldir perl5.5.660 --diffdir diffs

patchaperlup checks which highest numbered patch has already been applied to the perl in the perldir. The --upto argument defaults to the highest numbered patch in the directory given by the --diffdir argument. The --start argument defaults to the last patch referenced in the Changes file in the untarred perl sources plus one.

So the above command is equivalent to something like

perl patchaperlup --perldir perl5.5.660 --diffdir diffs \
     --start 5199 --upto 12345

depending on the contents of your diffdir. (perl5.5.660 had finished with patch 5198.)

The batch job is pretty verbose and explains what it is doing. The reason for the verbosity is that it can take a while until patchaperlup is finishing. Verbosity can be turned off with the --quiet switch and increased with the --verbose switch.

patchaperlup prints a few mail-header-like lines to STDOUT, namely

Version: version of patchaperlup
Perldir: perl directory
Diffdir: directory containing the patches
Firstpatch: number of the first applied patch
Lastpatch: number of the last applied patch

everything else is printed to STDERR.

The --version switch prints the version and exits.

BUGS

Patchaperlup skips patching of many files it considers inconvenient. See the source code for a list of these. A real pedantic way of reconstructing the perl history is perlpatch2svn, a script to generate a subversion repository from the APC.

PREREQUISITES

The programs zcat and patch must be in your path. Likewise perl and the utility patchls (which can be found in recent perl distributions) must be available in the path. patchls must not be too old (the one with 5.8.0 is OK).

AUTHOR

Andreas Koenig <andreas.koenig@anima.de>