OpenBSD manual page server

Manual Page Search Parameters

UPDATE-PATCHES(1) General Commands Manual UPDATE-PATCHES(1)

update-patchescreate or update patches for a given port

update-patches

update-patches is a helper script for the target update-patches in bsd.port.mk(5). It takes no argument, but uses quite a few environment variables as implicit parameters.

update-patches looks under WRKDIST for patched files. Those are files with extension PATCHORIG, except for those matching also DISTORIG.

Once those files are found, they are matched against the contents of directory PATCHDIR, most specifically files matching wildcard PATCH_LIST. Matching files are regenerated on the basis of

$ diff -u -p -a ${DIFF_ARGS} $file$PATCHORIG $file

and compared. Modified patches are updated and reported, new patches are generated, and old patches that no longer seem to exist are also reported.

As an exception, if a $file.beforesubst original file is found, it is used instead of $file in the diff line:

$ diff -u -p -a ${DIFF_ARGS} $file$PATCHORIG $file.beforesubst

The patch header is normalized to always be:

Index: $file
--- $file.orig
+++ $file

Patches with problematic cvs(1) keywords may be fixed if possible, and reported if not.

update-patches prints the list of changed patches for further study.

Extra parameters to insert into diff(1).
Extension to original files to ignore entirely.
Force patches to be regenerated even if they didn't change.
Path to existing and generated patches.
Extension to match for finding original files.
Only compare new patches to existing patches matching that pattern.
Force update-patches to tell about everything it does.
Directory to scan for files to compare.

cvs(1), diff(1), patch(1)

June 26, 2018 OpenBSD-7.2