Subject: Missing maintainers in bulk build reports
To: None <tech-pkg@NetBSD.org>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-pkg
Date: 01/13/2005 19:15:02
Hi again,

bulk build reports sometimes fail to get the correct value for the
maintainer field because they grep the Makefile directly.  This is
enough if the package has a single Makefile, but those that are
"splitted" (i.e., Makefile.common) don't work properly.

What do you think of the following patch, which uses bmake to get
the maintainer if the grep failed?  (I can't test it.)

Index: post-build
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bulk/post-build,v
retrieving revision 1.48
diff -u -r1.48 post-build
--- post-build	23 Nov 2004 19:31:46 -0000	1.48
+++ post-build	13 Jan 2005 18:13:58 -0000
@@ -193,6 +193,9 @@
 
 	$maintainer = `grep ^MAINTAINER $USR_PKGSRC/$pkg/Makefile`;
 	$maintainer =~ s/MAINTAINER=[ \t]*//;
+	if (! $maintainer) {
+		$maintainer = `cd $USR_PKGSRC/$pkg ; $ENV{"BMAKE"} show-var
VARNAME=MAINTAINER`;
+	}
 	$maintainer =~ s/</&lt;/g;
 	$maintainer =~ s/>/&gt;/g;
 	chomp($maintainer);

Cheers,

-- 
Julio M. Merino Vidal <jmmv@menta.net>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/