Subject: Re: Patch naming
To: None <tech-pkg@NetBSD.org>
From: Chuck Yerkes <chuck+nbsd@2003.snew.com>
List: tech-pkg
Date: 12/30/2003 20:37:00
Quoting Ben Collver (collver1@comcast.net):
> On Tue, Dec 30, 2003 at 05:36:14PM -0500, Chuck Yerkes wrote:
> > So... don't present useful information cause it doesn't LOOK neat!?
>
> The useful information is already there.  grep ^+++ patches/p*
> In theory patches should be fed upstream and there should not be an overly
In theory.  And likely in practice.  In reality, however, some packages don't
adopt patches quickly or, at least, don't do releases very often.  Below for more.

> large number of patches to keep track of.  It doesn't seem all that  
> inconvenient to me.

Hmmm, trying to get this to work with db3 rather than db2.  
Okay, did that...  now build it.  Doh, it must be patching configure.
Lets derive which file it is...

"It's just how we've done it" is often a bad answer.

There is no "win" by using "patch-aa"  vs "patch-configure".
"it's prettier" and "it makes them line up in neat columns" and
"I can quickly count them"  are about all I can come up with.
And they're pretty flaccid reasons.


I was delighted when OpenBSD's ports became more readable/approachable.
It's especially easier when fixing something and MAKING patches.  Roughly:

If there's a choice between doing it good and doing it better and the effort [not totally
minor] is "follow the new form as you upgrade patches", then there's not a lot of reason
to embrace obtuseness|mediocrity.  That's Microsoft's job.

what does (random grab?) /usr/pkgsrc/devel/cmdline/patches/patch-ak
change?  Oh, 2 levels of abstraction to find out

With minor tweaking of file names to transform / to _ and the like...

for file in `find . -newer STARTFILE `; do
	pfile=`echo $file | patch_file_tweak`
	diff ${file}.ORIG ${file} > ../../patches-${pfile}
	echo $file
done

So lets take a gander at how many patches:
  Almost 10000 patch files
  210 with > 10 patches
  4 with > 100 patches.
% locate /usr/pkgsrc/ |grep patches/patch | sed 's:/[^/]*$::' | \
   uniq -c | sort -n |tail -22
  30 /usr/pkgsrc/editors/emacs20/patches
  30 /usr/pkgsrc/games/ularn/patches
  32 /usr/pkgsrc/x11/kdebase/patches
  33 /usr/pkgsrc/graphics/tcm/patches
  34 /usr/pkgsrc/net/netatalk-umich/patches
  34 /usr/pkgsrc/news/knews/patches
  37 /usr/pkgsrc/devel/cmdline/patches
  38 /usr/pkgsrc/mail/yatsvrs/patches
  39 /usr/pkgsrc/security/ssh/patches
  39 /usr/pkgsrc/x11/kdelibs3/patches
  40 /usr/pkgsrc/x11/lesstif12/patches
  41 /usr/pkgsrc/net/netatalk-asun/patches
  53 /usr/pkgsrc/x11/kdelibs2/patches
  55 /usr/pkgsrc/audio/kdemultimedia3/patches
  55 /usr/pkgsrc/devel/mit-pthreads/patches
  55 /usr/pkgsrc/net/ppp-mppe/patches
  59 /usr/pkgsrc/parallel/glunix/patches
  90 /usr/pkgsrc/x11/xview-clients/patches
 106 /usr/pkgsrc/x11/xview-lib/patches
 115 /usr/pkgsrc/x11/kdebase3/patches
 121 /usr/pkgsrc/misc/openoffice/patches
 135 /usr/pkgsrc/x11/kdebase2/patches