UPDATE-PATCHES(1)
π NAME π
update-patches β create or update patches for a given port β¨
This is the UPDATE-PATCHES(1) page from the General Commands Manual, bestie, and it's literally here to explain update-patches in bsd.port.mk(5).
πΈ SYNOPSIS πΈ
update-patches
π¦ DESCRIPTION π¦
Okay so update-patches is a helper script for the update-patches target in bsd.port.mk(5) β yes, same name, iconic. It takes no argument, but it uses quite a few environment variables as implicit parameters. The env vars are carrying the whole situation, no cap.
update-patches looks under WRKDIST for patched files. Those are files with extension PATCHORIG, except for those matching also DISTORIG β so if it matches DISTORIG too, it gets ignored entirely, periodt.
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. The way this script keeps the patch shelf cute? Obsessed.
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. So it'll try to fix the cvs keyword situation, but if it can't, it reports it β no silent struggle, bestie.
update-patches prints the list of changed patches for further study. That's your reading list, basically. π
π ENVIRONMENT π
These environment variables are the implicit parameters, and they all matter:
DIFF_ARGSβ Extra parameters to insert intodiff(1). Extra diff bits, slay.DISTORIGβ Extension to original files to ignore entirely. If it matches, it's out β ignored entirely.FORCE_REGENβ Force patches to be regenerated even if they didn't change. Yes, even if they didn't change.PATCHDIRβ Path to existing and generated patches. The patch directory itself.PATCHORIGβ Extension to match for finding original files. This is how it spots the originals.PATCH_LISTβ Only compare new patches to existing patches matching that pattern. A wildcard filter moment.PATCH_VERBOSEβ Forceupdate-patchesto tell about everything it does. Maximum yapping mode.WRKDISTβ Directory to scan for files to compare. The scan zone.
π SEE ALSO π
Signed off from Debian on June 26, 2018 β this is the UPDATE-PATCHES(1) manual page, and that's the whole vibe π«Άπ
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2010 Marc Espie <espie@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms