diff options
author | wiz <wiz@pkgsrc.org> | 2014-06-24 15:00:27 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-06-24 15:00:27 +0000 |
commit | 77b944758fe4261085c94b1c3168bc44cedb13f8 (patch) | |
tree | 856f6c82611608ea05a724a055872a34d047be18 /pkgtools | |
parent | 8568f2dde0ae5eeb309fc2b2b8f24b27c09055b5 (diff) | |
download | pkgsrc-77b944758fe4261085c94b1c3168bc44cedb13f8.tar.gz |
Make finddepends(1) parse Makefile.common's "# used by" lines and
also emit packages mentioned there, if a match was found in that
Makefile.common.
Adapt revbump HOWTO slightly, but not completely, since I don't
trust the comments enough yet.
Bump version.
Leaf package.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/revbump/Makefile | 5 | ||||
-rw-r--r-- | pkgtools/revbump/files/finddepends | 9 | ||||
-rw-r--r-- | pkgtools/revbump/files/finddepends.1 | 11 | ||||
-rw-r--r-- | pkgtools/revbump/files/revbump.1 | 6 |
4 files changed, 21 insertions, 10 deletions
diff --git a/pkgtools/revbump/Makefile b/pkgtools/revbump/Makefile index a528081c90b..7eea4c496b8 100644 --- a/pkgtools/revbump/Makefile +++ b/pkgtools/revbump/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.28 2014/05/29 23:37:15 wiz Exp $ +# $NetBSD: Makefile,v 1.29 2014/06/24 15:00:27 wiz Exp $ -PKGNAME= revbump-2.7 -PKGREVISION= 1 +PKGNAME= revbump-2.8 CATEGORIES= pkgtools MAINTAINER= wiz@NetBSD.org diff --git a/pkgtools/revbump/files/finddepends b/pkgtools/revbump/files/finddepends index ab6513185ef..ccca724690f 100644 --- a/pkgtools/revbump/files/finddepends +++ b/pkgtools/revbump/files/finddepends @@ -1,7 +1,7 @@ #!@PERL@ -w # -*- perl -*- # -# $NetBSD: finddepends,v 1.10 2014/05/15 23:50:14 wiz Exp $ +# $NetBSD: finddepends,v 1.11 2014/06/24 15:00:27 wiz Exp $ # # Copyright (c) 2006, 2014 The NetBSD Foundation, Inc. # @@ -123,8 +123,12 @@ for $makefile (@makefiles) { # print "* reading $makefile\n"; open OUT, $makefile or die "can't open $makefile"; $content = ""; + my @used_by; while (<OUT>) { chomp($_); + if (m/^# used by (.*)/) { + push @used_by, $1; + } next if m/^\s*#/; $content .= $_; } @@ -140,6 +144,9 @@ for $makefile (@makefiles) { if ($found) { $makefile =~ s,$PKGSRCDIR/,,; print "$makefile\n"; + for my $user (@used_by) { + print "$user\n"; + } } } diff --git a/pkgtools/revbump/files/finddepends.1 b/pkgtools/revbump/files/finddepends.1 index 9ae5c8710be..3eb95bc5f15 100644 --- a/pkgtools/revbump/files/finddepends.1 +++ b/pkgtools/revbump/files/finddepends.1 @@ -1,6 +1,6 @@ -.\" $NetBSD: finddepends.1,v 1.4 2006/04/13 18:58:17 wiz Exp $ +.\" $NetBSD: finddepends.1,v 1.5 2014/06/24 15:00:27 wiz Exp $ .\" -.\" Copyright (c) 2006 The NetBSD Foundation, Inc. +.\" Copyright (c) 2006, 2014 The NetBSD Foundation, Inc. .\" .\" This code was originally contributed to the NetBSD Foundation, Inc. .\" by Thomas Klausner <wiz@NetBSD.org>. @@ -31,7 +31,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 13, 2006 +.Dd June 24, 2014 .Dt FINDDEPENDS 1 .Os .Sh NAME @@ -52,6 +52,11 @@ on the command line, it will recursively find all buildlink3.mk files that include it, and then find all Makefiles that include any of the buildlink3.mk files. .Pp +When reading Makefile.common, it will parse +.Dq # used by +lines and emit those packages too, so there might be duplicates in +the output. +.Pp .Nm Fl h displays a short usage. .Pp diff --git a/pkgtools/revbump/files/revbump.1 b/pkgtools/revbump/files/revbump.1 index ba05317e46f..54f50b27e90 100644 --- a/pkgtools/revbump/files/revbump.1 +++ b/pkgtools/revbump/files/revbump.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: revbump.1,v 1.18 2014/05/06 12:41:46 wiz Exp $ +.\" $NetBSD: revbump.1,v 1.19 2014/06/24 15:00:27 wiz Exp $ .\" .\" Copyright (c) 2003, 2004, 2005, 2006, 2010, 2012, 2013, 2014 The NetBSD Foundation, Inc. .\" @@ -31,7 +31,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd May 6, 2014 +.Dd June 24, 2014 .Dt REVBUMP 1 .Os .Sh NAME @@ -85,7 +85,7 @@ and would be: .Bd -literal -offset indent cd /usr/pkgsrc -finddepends category/package \*[Gt] allbump +finddepends category/package | sort -u \*[Gt] allbump grep buildlink3.mk allbump | sed 's/.buildlink3.mk//' \*[Gt] bl3bump grep -e Makefile.common -e mk$ allbump > commonbump [read commonbump and replace entries with all packages including the |