From 6095e686becc6a004a7816f387597b2d21f2cdda Mon Sep 17 00:00:00 2001 From: rillig Date: Sat, 16 Jan 2016 16:29:03 +0000 Subject: Updated pkglint to 5.3.1 Changes since 5.3: * disabled CPU profiling on NetBSD, since it crashes without any output; see https://github.com/golang/go/issues/13914 --- pkgtools/pkglint/Makefile | 4 ++-- pkgtools/pkglint/files/main.go | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'pkgtools/pkglint') diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 9f86db77413..60fe50b603e 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.475 2016/01/12 01:02:48 rillig Exp $ +# $NetBSD: Makefile,v 1.476 2016/01/16 16:29:03 rillig Exp $ -PKGNAME= pkglint-5.3 +PKGNAME= pkglint-5.3.1 DISTFILES= # none CATEGORIES= pkgtools diff --git a/pkgtools/pkglint/files/main.go b/pkgtools/pkglint/files/main.go index 4386416ba5f..5c5768af71a 100644 --- a/pkgtools/pkglint/files/main.go +++ b/pkgtools/pkglint/files/main.go @@ -5,6 +5,7 @@ import ( "io" "os" "path/filepath" + "runtime" "runtime/pprof" ) @@ -39,12 +40,14 @@ func (pkglint *Pkglint) Main(args ...string) (exitcode int) { } if G.opts.Profiling { - f, err := os.Create("pkglint.pprof") - if err != nil { - dummyLine.Fatalf("Cannot create profiling file: %s", err) + if runtime.GOOS != "netbsd" { // See https://github.com/golang/go/issues/13914 + f, err := os.Create("pkglint.pprof") + if err != nil { + dummyLine.Fatalf("Cannot create profiling file: %s", err) + } + pprof.StartCPUProfile(f) + defer pprof.StopCPUProfile() } - pprof.StartCPUProfile(f) - defer pprof.StopCPUProfile() G.rematch = NewHistogram() G.renomatch = NewHistogram() G.retime = NewHistogram() -- cgit v1.2.3