tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fix build version RCS id



There are a couple of packages that always get rebuilt during a pbulk
run, regardless of whether they have been updated or not.

Taking a closer look, this is due to the embedded build version being
incorrect and matching incomplete RCS ids in patches.  For example:

  devel/bmkdep/patches/patch-mkdep.c:@@ -52,7 +52,6 @@ __RCSID("$NetBSD: mkdep.c,v 1.43 2013/03

is matched by mk/pkgformat/pkg/metadata.mk, resulting in an unwanted extra line
in the build version output:

  $ pkg_info -qb bmkdep-20131215.tgz
  devel/bmkdep/Makefile:  $NetBSD: Makefile,v 1.3 2014/01/02 00:19:22 cheusov Exp $
  devel/bmkdep/PLIST:     $NetBSD: PLIST,v 1.1 2013/12/08 15:22:23 cheusov Exp $
  devel/bmkdep/distinfo:  $NetBSD: distinfo,v 1.5 2014/01/13 00:01:12 cheusov Exp $
  devel/bmkdep/patches/patch-mkdep.c:     $
  devel/bmkdep/patches/patch-mkdep.c:     $NetBSD: patch-mkdep.c,v 1.5 2014/01/13 00:01:12 cheusov Exp $

The proposed fix to mk/pkgformat/pkg/metadata.mk is to ensure RCS ids have the
final "$", i.e.:

@@ -161,3 +161,3 @@ ${_BUILD_VERSION_FILE}:
 	while read file; do						\
-		${GREP} '\$$NetBSD' $$file 2>/dev/null |		\
+		${EGREP} '\$$NetBSD:.*\$$' $$file 2>/dev/null |		\
 		${SED} -e "s|^|$$file:|";				\

The resulting package looks much better:

  $ pkg_info -qb bmkdep-20131215.tgz
  devel/bmkdep/Makefile:  $NetBSD: Makefile,v 1.3 2014/01/02 00:19:22 cheusov Exp $
  devel/bmkdep/PLIST:     $NetBSD: PLIST,v 1.1 2013/12/08 15:22:23 cheusov Exp $
  devel/bmkdep/distinfo:  $NetBSD: distinfo,v 1.5 2014/01/13 00:01:12 cheusov Exp $
  devel/bmkdep/patches/patch-mkdep.c:     $NetBSD: patch-mkdep.c,v 1.5 2014/01/13 00:01:12 cheusov Exp $

and should fix these packages:

  $ git grep '$NetBSD: [^$]*$'
  devel/bmkdep/patches/patch-mkdep.c:@@ -52,7 +52,6 @@ __RCSID("$NetBSD: mkdep.c,v 1.43 2013/03
  filesystems/fs-utils/patches/patch-lib_getbsize.c:@@ -46,10 +46,6 @@ __RCSID("$NetBSD: getbsize.c,v 1.2 2009/
  security/heimdal/patches/patch-lib_libedit_src_unvis.c:@@ -46,9 +46,11 @@ __RCSID("$NetBSD: unvis.c,v 1.32 2010/11
  security/heimdal/patches/patch-lib_libedit_src_vis.c:@@ -67,6 +67,7 @@ __RCSID("$NetBSD: vis.c,v 1.41 2009/11/2

but I'd like a quick review of this before committing, to ensure I didn't
overlook anything.

Thanks,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index