Subject: CHANGES files and cvs
To: None <>
From: Greg Troxel <>
List: tech-pkg
Date: 10/03/2006 13:13:18
Content-Transfer-Encoding: quoted-printable

'make changes-entry' currently appends a line to
pkgsrc/doc/CHANGES-2006.   I have two problems with this:

1) I use cvs with CVSREAD=3Dt in my environment, so all my checked-out
files are 444 until I do 'cvs edit' from the shell, or more likely M-x
vc-toggle-read-only.  This helps prevent accidental changes, as well
as records a kind of watch on the file ('cvs editors', and the mail
one gets when someone commits to a file I'm editing).  So CHANGES-2006
is always 444, and I have to go cvs edit it first.

2) I tend to 'cvs update' in pkgsrc every week or so, and sometimes
update a package in that state, doing cvs up in the pkg dir but not
the whole tree first.  Even if I cvs update, sometimes by the time
I've tested for an hour someone else will have committed to

So, as I see it, the steps to take after committing to a package are

1) (cd ../../doc && cvs update)
(IMHO, needed for everyone)

2) (cd ../../doc && cvs edit CHANGES-2006)
(needed for those who set CVSREAD)

The following patch makes changes-entry do what I want.  I'm guessing
some will object, so I'd like to understand the objections so I can
modify it to be ok - perhaps turning on this behavior only if a
variable is set (or turning it off if a variable is set, depending on
the prevailing view) is rw (probably a good idea).

Index: mk/
RCS file: /cvsroot/pkgsrc/mk/,v
retrieving revision 1.1885
diff -u -r1.1885
=2D-- mk/	3 Oct 2006 14:22:16 -0000	1.1885
+++ mk/	3 Oct 2006 17:12:33 -0000
@@ -897,7 +897,8 @@
 CTYPE?=3D			Updated
 _CYEAR_cmd=3D		${DATE} -u +%Y
 _CDATE_cmd=3D		${DATE} -u +%Y-%m-%d
@@ -918,6 +919,9 @@
 .PHONY: changes-entry
 	${_PKG_SILENT}${_PKG_DEBUG}					\
+	(cd ${PKGSRCDIR}/doc; \
+	cvs up ${PKGSRC_CHANGES_BASE:Q}; \
+	test -w ${PKGSRC_CHANGES_BASE:Q} || cvs edit ${PKGSRC_CHANGES_BASE:Q})
 .include "${PKGSRCDIR}/mk/internal/"

Content-Type: application/pgp-signature

Version: GnuPG v1.4.5 (NetBSD)