Subject: it would be _terribly_ nice if patch files always corresponded to the files patched
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.org>
From: Greg A. Woods <email@example.com>
Date: 04/29/2007 14:33:29
Content-Type: text/plain; charset=US-ASCII
It would be _terribly_ nice if the names of the pkgsrc patch files
always corresponded directly to the names of the source files patched.
For example I had hack in security/gnutls/patches/patch-aa to allow it
to build properly.
That hack was a patch against the "configure" script.
Since updating to pkgsrc-2007Q1 that same patch file now patches some
completely different source file.
That makes it IMPOSSIBLE to easily reconcile conflicts in the patch file
without undoing the merge, redoing the old patch manually, finding the
new patch file to edit, update it, etc. A nightmare and a needless
pointless make-work project.
In FreeBSD ports, the "new" policy is to name the patch file after the
source file being patched. This is a _very_ smart common-sense policy!
If we're going to keep using one patch file per patched file then the
ONLY _smart_ thing to do would be to simply use the name of the file
being patched as the name of the patch file. The directory the patch
file is contained in is sufficient to identify it as a patch file.
I.e. there is absolutely no need to monkey with the name in any way
whatsoever -- no suffix or prefix need be added.
FreeBSD ports uses a "patch-" prefix because they don't have a separate
"patches" subdirectory. If pkgsrc were to follow suit and move patches
into the "files" subdirectory then use of an identical "patch-" prefix
would be appropriate, but not otherwise.
The whole idea of using the "patch-xx" naming convention was bogus from
the get go, but at least its original inventor saw the light and stopped
using this mess some time ago.
I know I'm being a bit abrasive in my presentation of this proposal, but
this is nowhere near the first time I've been massively annoyed to find
that my changes to patch files have migrated all over hell's half acre.
I think the massive remove/add operations on the repository would be
well worth the effort.
It may also be well worth considering elimination of the "patches"
subdirectory in the same way FreeBSD ports did the job too -- my initial
feeling though is that it's not worth it since relatively few package
modules already have "files" subdirectories while having a patches
specific subdirectory lends to not having to lengthen or otherwise
change the name of the patched file (i.e. this is the most filesystem
friendly way to fix the problem).
Greg A. Woods
<firstname.lastname@example.org> +1 416 489-5852 x122 http://www.planix.com/
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
-----END PGP SIGNATURE-----