tech-pkg archive

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

Consistently detecting $NetBSD$ lines



Hi,

right now, pkgtools/pkglint is built unnecessarily in bulk builds
because of a bug in the pkgsrc infrastructure. The cause is that there
are two different places where the $NetBSD$ RCS Ids are handled
specially [1]. These places differ slightly but in my mind should be
exactly the same.

[1]
http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/regress/plus_build_version/spec?rev=1.2

Right now the generated +BUILD_VERSION file in the binary packages can
contain lines that essentially have just a single $ instead of a useful
RCS Id. In the example file [2] I have replaced the $ with * to avoid
this file being modified by CVS as well.

[2]
http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/regress/plus_build_version/files/expected?rev=1.2

I'd like to make mk/pkgformat/pkg/metadata.mk more precise:

- ${GREP} '\$$NetBSD' $$file
+ ${GREP} '[$$]NetBSD:[^$$]*[$$]' $$file

And fine-tune pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date:

- @SED@ \
-     -e '/[$]NetBSD/!d' \
-     -e 's/^.*\([$]NetBSD[^$]*[$]\).*$/\1/;q'
+ @SED@ \
+     -e '/[$]NetBSD:[^$]*[$]/!d' \
+     -e 's/^.*\([$]NetBSD:[^$]*[$]\).*$/\1/;q'

As a consequence of these changes, I expect that some packages will be
rebuilt in the bulk build although they haven't actually changed. But
after this one-time rebuild, they will not be built again since
metadata.mk and pkg-up-to-date now agree on how to handle these RCS Id
lines.

Are there any objections to applying this change? Or anything else I forgot?

Roland


Home | Main Index | Thread Index | Old Index