Subject: Re: CVS commit: pkgsrc/doc/guide/files
To: Roland Illig <>
From: Alistair Crooks <>
List: pkgsrc-changes
Date: 12/04/2005 00:16:24
On Fri, Dec 02, 2005 at 04:28:21PM +0100, Roland Illig wrote:
> Alistair Crooks wrote:
> >On Fri, Dec 02, 2005 at 01:52:31PM +0000, Roland Illig wrote:
> >
> >>Module Name:	pkgsrc
> >>Committed By:	rillig
> >>Date:		Fri Dec  2 13:52:31 UTC 2005
> >>
> >>Modified Files:
> >>	pkgsrc/doc/guide/files: components.xml
> >>
> >>Log Message:
> >>Don't encourage users to abuse the patch framework for installing
> >>pkgsrc-specific files into ${WRKSRC}. I've lately seen too many patches
> >>against /dev/null that contain RCS Ids.
> >
> >
> >I don't understand what you're trying to achieve with this artificial
> >restriction.  I would much rather have all pkgsrc changes to a package
> >be done using the patch stage and framework.  It is much easier, for a
> >number of reasons.
> - Files in the files/ directory can be edited more easily.

That is neither here nor there.  If you want to make a change to a
file in the package, it should be done as part of the ${WRKSRC}
expansion of the source.  That gives the whole context, not just a
single part of it.
> - Patches against /dev/null are larger than plain files.

I do not think that pkgsrc strategy should be decided on the tiny
amount of extra overhead used by patch(1).

In addition, files in the files/ subdirectory need to be copied to
${WRKSRC} in a separate target in the Makefile.  This adds to the
Makefile's contents.
> - RCS Ids in patch files always have patch-?? as filename, not the name 
> under which the file is installed in ${WRKSRC}.

+ Expanded RCS Ids in ${WRKSRC} are not meaningful

+ Feeding patches back upstream is much easier when they're all in one

Moreover, the last point should be emphasised. On a number of occasions,
I have patched NetBSD-specific files, only to find out that when I
test the package's build, it fails because I have patched a file which
was NetBSD-specific. Please do not encourage people to break the POLS.

I believe that changes to the contents of the distfile should be made
using patch - that's a fairly easy goal to remember, it doesn't break
the POLS, it keeps everything in one place, it is easy to feed patches
back upstream - to link into a thread somewhere else.