These go to eleven. revbump-2.11: - Honor PKGSRCDIR in check-cvs-diff and replace-commonbump - Document PKGSRCDIR all the man pages, not just in finddepends(1)diff -r1.32 -r1.33 pkgsrc/pkgtools/revbump/Makefile
(snj)
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | # $NetBSD: Makefile,v 1.32 2014/12/15 23:25:54 mef Exp $ | 1 | # $NetBSD: Makefile,v 1.33 2015/02/09 00:58:44 snj Exp $ | |
2 | 2 | |||
3 | PKGNAME= revbump-2.10 | 3 | PKGNAME= revbump-2.11 | |
4 | CATEGORIES= pkgtools | 4 | CATEGORIES= pkgtools | |
5 | 5 | |||
6 | MAINTAINER= wiz@NetBSD.org | 6 | MAINTAINER= wiz@NetBSD.org | |
7 | HOMEPAGE= http://www.pkgsrc.org/ | 7 | HOMEPAGE= http://www.pkgsrc.org/ | |
8 | COMMENT= Tools for bumping PKGREVISIONs (for pkgsrc developers) | 8 | COMMENT= Tools for bumping PKGREVISIONs (for pkgsrc developers) | |
9 | LICENSE= modified-bsd | 9 | LICENSE= modified-bsd | |
10 | 10 | |||
11 | WRKSRC= ${WRKDIR} | 11 | WRKSRC= ${WRKDIR} | |
12 | NO_CONFIGURE= yes | 12 | NO_CONFIGURE= yes | |
13 | USE_TOOLS+= perl:run | 13 | USE_TOOLS+= perl:run | |
14 | USE_LANGUAGES= # empty | 14 | USE_LANGUAGES= # empty | |
15 | 15 | |||
16 | INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 | 16 | INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: blbump.1,v 1.5 2008/10/17 14:23:58 he Exp $ | 1 | .\" $NetBSD: blbump.1,v 1.6 2015/02/09 00:58:44 snj Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c) 2003, 2004, 2005 The NetBSD Foundation, Inc. | 3 | .\" Copyright (c) 2003, 2004, 2005 The NetBSD Foundation, Inc. | |
4 | .\" | 4 | .\" | |
5 | .\" This code was originally contributed to the NetBSD Foundation, Inc. | 5 | .\" This code was originally contributed to the NetBSD Foundation, Inc. | |
6 | .\" by Julio Merino <jmmv@NetBSD.org> and Thomas Klausner <wiz@NetBSD.org>. | 6 | .\" by Julio Merino <jmmv@NetBSD.org> and Thomas Klausner <wiz@NetBSD.org>. | |
7 | .\" | 7 | .\" | |
8 | .\" Redistribution and use in source and binary forms, with or without | 8 | .\" Redistribution and use in source and binary forms, with or without | |
9 | .\" modification, are permitted provided that the following conditions | 9 | .\" modification, are permitted provided that the following conditions | |
10 | .\" are met: | 10 | .\" are met: | |
11 | .\" 1. Redistributions of source code must retain the above copyright | 11 | .\" 1. Redistributions of source code must retain the above copyright | |
12 | .\" notice, this list of conditions and the following disclaimer. | 12 | .\" notice, this list of conditions and the following disclaimer. | |
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
14 | .\" notice, this list of conditions and the following disclaimer in | 14 | .\" notice, this list of conditions and the following disclaimer in | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND | 21 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND | |
22 | .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | 22 | .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
23 | .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | 23 | .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
24 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 24 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
25 | .\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY | 25 | .\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY | |
26 | .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 26 | .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | 27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | |
28 | .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 28 | .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
29 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | 29 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | |
30 | .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 30 | .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
31 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | 31 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
32 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
33 | .\" | 33 | .\" | |
34 | .Dd March 7, 2006 | 34 | .Dd February 9, 2015 | |
35 | .Dt BLBUMP 1 | 35 | .Dt BLBUMP 1 | |
36 | .Os | 36 | .Os | |
37 | .Sh NAME | 37 | .Sh NAME | |
38 | .Nm blbump | 38 | .Nm blbump | |
39 | .Nd tool to help bumping dependencies in buildlink3 files automatically | 39 | .Nd tool to help bumping dependencies in buildlink3 files automatically | |
40 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS | |
41 | .Nm | 41 | .Nm | |
42 | .Op Fl h | 42 | .Op Fl h | |
43 | .Op Fl p Ar pkgsrcdir | 43 | .Op Fl p Ar pkgsrcdir | |
44 | .Op cat1/pkg1 ... catN/pkgN | 44 | .Op cat1/pkg1 ... catN/pkgN | |
45 | .Sh DESCRIPTION | 45 | .Sh DESCRIPTION | |
46 | .Nm | 46 | .Nm | |
47 | is a perl script for pkgsrc developers that simplifies bumping | 47 | is a perl script for pkgsrc developers that simplifies bumping | |
@@ -57,16 +57,21 @@ displays a short usage. | @@ -57,16 +57,21 @@ displays a short usage. | |||
57 | .Pp | 57 | .Pp | |
58 | If | 58 | If | |
59 | .Fl p | 59 | .Fl p | |
60 | is given, | 60 | is given, | |
61 | .Ar pkgsrcdir | 61 | .Ar pkgsrcdir | |
62 | is used instead of the default | 62 | is used instead of the default | |
63 | .Pa /usr/pkgsrc . | 63 | .Pa /usr/pkgsrc . | |
64 | .Pp | 64 | .Pp | |
65 | .Nm | 65 | .Nm | |
66 | prints the package name | 66 | prints the package name | |
67 | (in | 67 | (in | |
68 | .Ar category/package | 68 | .Ar category/package | |
69 | form) on stdout for each package where it failed. | 69 | form) on stdout for each package where it failed. | |
70 | .Sh ENVIRONMENT | |||
71 | .Ev PKGSRCDIR | |||
72 | pkgsrc root directory. | |||
73 | Defaults to | |||
74 | .Pa /usr/pkgsrc . | |||
70 | .Sh SEE ALSO | 75 | .Sh SEE ALSO | |
71 | .Xr finddepends 1 , | 76 | .Xr finddepends 1 , | |
72 | .Xr revbump 1 | 77 | .Xr revbump 1 |
@@ -24,32 +24,37 @@ Synopsys: | @@ -24,32 +24,37 @@ Synopsys: | |||
24 | Where: | 24 | Where: | |
25 | -h Show this help | 25 | -h Show this help | |
26 | -p pkgsrc directory other than /usr/pkgsrc | 26 | -p pkgsrc directory other than /usr/pkgsrc | |
27 | -v verbose (not actually implemented yet) | 27 | -v verbose (not actually implemented yet) | |
28 | cvs-diff-u_output_file: | 28 | cvs-diff-u_output_file: | |
29 | The name of input. Usually the file including 'cvs diff -u' | 29 | The name of input. Usually the file including 'cvs diff -u' | |
30 | output (default cvs-diff) | 30 | output (default cvs-diff) | |
31 | See Also: | 31 | See Also: | |
32 | revbump(1) for how to use it. | 32 | revbump(1) for how to use it. | |
33 | HELP | 33 | HELP | |
34 | } | 34 | } | |
35 | 35 | |||
36 | sub main() { | 36 | sub main() { | |
37 | my ($PKGSRCDIR) = '/usr/pkgsrc'; | 37 | my ($PKGSRCDIR); | |
38 | my ($CVS_DIFF) = 'cvs-diff'; | 38 | my ($CVS_DIFF) = 'cvs-diff'; | |
39 | my ($file_to_edit); | 39 | my ($file_to_edit); | |
40 | my ($stay, $mod) = (0,0); | 40 | my ($stay, $mod) = (0,0); | |
41 | my ($Makefile, $buildlink3, $other) = (0, 0, 0); | 41 | my ($Makefile, $buildlink3, $other) = (0, 0, 0); | |
42 | 42 | |||
43 | $PKGSRCDIR = $ENV{PKGSRCDIR}; | |||
44 | if (! $PKGSRCDIR) { | |||
45 | $PKGSRCDIR = "/usr/pkgsrc"; | |||
46 | } | |||
47 | ||||
43 | getopts('hvp:',\%opts); | 48 | getopts('hvp:',\%opts); | |
44 | if ($ARGV[0]) { $CVS_DIFF = $ARGV[0]} | 49 | if ($ARGV[0]) { $CVS_DIFF = $ARGV[0]} | |
45 | if ($opts{'p'}) { $PKGSRCDIR = $opts{'p'}; } | 50 | if ($opts{'p'}) { $PKGSRCDIR = $opts{'p'}; } | |
46 | if ($opts{'h'}) { usage() ; exit ;} | 51 | if ($opts{'h'}) { usage() ; exit ;} | |
47 | 52 | |||
48 | # for using rename, unlink | 53 | # for using rename, unlink | |
49 | chdir $PKGSRCDIR; | 54 | chdir $PKGSRCDIR; | |
50 | 55 | |||
51 | open(CVS_DIFF, $CVS_DIFF) || die "Problem opening file $CVS_DIFF: $!\n"; | 56 | open(CVS_DIFF, $CVS_DIFF) || die "Problem opening file $CVS_DIFF: $!\n"; | |
52 | while(<CVS_DIFF>){ | 57 | while(<CVS_DIFF>){ | |
53 | # Looking for the +++ filename line in cvs diff (supposed to use 'cvs diff -u') | 58 | # Looking for the +++ filename line in cvs diff (supposed to use 'cvs diff -u') | |
54 | $file_to_edit = ''; | 59 | $file_to_edit = ''; | |
55 | if ( /^\+\+\+ (\S+)/) { | 60 | if ( /^\+\+\+ (\S+)/) { |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: check-cvs-diff.1,v 1.2 2014/12/16 11:38:54 wiz Exp $ | 1 | .\" $NetBSD: check-cvs-diff.1,v 1.3 2015/02/09 00:58:44 snj Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c) 2003, 2004, 2005 The NetBSD Foundation, Inc. | 3 | .\" Copyright (c) 2003, 2004, 2005 The NetBSD Foundation, Inc. | |
4 | .\" | 4 | .\" | |
5 | .\" This code was originally contributed to the NetBSD Foundation, Inc. | 5 | .\" This code was originally contributed to the NetBSD Foundation, Inc. | |
6 | .\" by Makoto Fujiwara <mef@NetBSD.org>. | 6 | .\" by Makoto Fujiwara <mef@NetBSD.org>. | |
7 | .\" | 7 | .\" | |
8 | .\" Redistribution and use in source and binary forms, with or without | 8 | .\" Redistribution and use in source and binary forms, with or without | |
9 | .\" modification, are permitted provided that the following conditions | 9 | .\" modification, are permitted provided that the following conditions | |
10 | .\" are met: | 10 | .\" are met: | |
11 | .\" 1. Redistributions of source code must retain the above copyright | 11 | .\" 1. Redistributions of source code must retain the above copyright | |
12 | .\" notice, this list of conditions and the following disclaimer. | 12 | .\" notice, this list of conditions and the following disclaimer. | |
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
14 | .\" notice, this list of conditions and the following disclaimer in | 14 | .\" notice, this list of conditions and the following disclaimer in | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND | 21 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND | |
22 | .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | 22 | .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
23 | .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | 23 | .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
24 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 24 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
25 | .\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY | 25 | .\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY | |
26 | .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 26 | .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | 27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | |
28 | .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 28 | .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
29 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | 29 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | |
30 | .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 30 | .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
31 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | 31 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
32 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
33 | .\" | 33 | .\" | |
34 | .Dd December 14, 2014 | 34 | .Dd February 9, 2015 | |
35 | .Dt CHECK-CVS-DIFF 1 | 35 | .Dt CHECK-CVS-DIFF 1 | |
36 | .Os | 36 | .Os | |
37 | .Sh NAME | 37 | .Sh NAME | |
38 | .Nm check-cvs-diff | 38 | .Nm check-cvs-diff | |
39 | .Nd clean up unintended revbump(1) replacements | 39 | .Nd clean up unintended revbump(1) replacements | |
40 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS | |
41 | .Nm | 41 | .Nm | |
42 | .Op Fl hv | 42 | .Op Fl hv | |
43 | .Op Fl p Ar pkgsrcdir | 43 | .Op Fl p Ar pkgsrcdir | |
44 | .Ar cvs-diff-u_output-file | 44 | .Ar cvs-diff-u_output-file | |
45 | .Sh DESCRIPTION | 45 | .Sh DESCRIPTION | |
46 | .Nm | 46 | .Nm | |
47 | is a perl script for pkgsrc developers that simplifies checking and replacing fixed | 47 | is a perl script for pkgsrc developers that simplifies checking and replacing fixed | |
@@ -63,17 +63,22 @@ is used instead of the default | @@ -63,17 +63,22 @@ is used instead of the default | |||
63 | .Pa /usr/pkgsrc . | 63 | .Pa /usr/pkgsrc . | |
64 | .Pp | 64 | .Pp | |
65 | If | 65 | If | |
66 | .Fl v | 66 | .Fl v | |
67 | is given, | 67 | is given, | |
68 | .Nm | 68 | .Nm | |
69 | outputs more verbose information. | 69 | outputs more verbose information. | |
70 | .Pp | 70 | .Pp | |
71 | .Nm | 71 | .Nm | |
72 | prints the package name | 72 | prints the package name | |
73 | (in | 73 | (in | |
74 | .Ar category/package | 74 | .Ar category/package | |
75 | form) on stdout for each package where it failed, but usually none. | 75 | form) on stdout for each package where it failed, but usually none. | |
76 | .Sh ENVIRONMENT | |||
77 | .Ev PKGSRCDIR | |||
78 | pkgsrc root directory. | |||
79 | Defaults to | |||
80 | .Pa /usr/pkgsrc . | |||
76 | .Sh SEE ALSO | 81 | .Sh SEE ALSO | |
77 | .Xr finddepends 1 , | 82 | .Xr finddepends 1 , | |
78 | .Xr replace-commonbump 1 , | 83 | .Xr replace-commonbump 1 , | |
79 | .Xr revbump 1 | 84 | .Xr revbump 1 |
@@ -4,27 +4,27 @@ | @@ -4,27 +4,27 @@ | |||
4 | # (1) | 4 | # (1) | |
5 | # Travers all the files (with some filtering) over /usr/pkgsrc | 5 | # Travers all the files (with some filtering) over /usr/pkgsrc | |
6 | # pick up referenced -> referer relation and store them to %HASH | 6 | # pick up referenced -> referer relation and store them to %HASH | |
7 | # (multiple files are concatinated by ';' ) | 7 | # (multiple files are concatinated by ';' ) | |
8 | # (2) | 8 | # (2) | |
9 | # read input (usually named 'commonbump'), and expand one line into | 9 | # read input (usually named 'commonbump'), and expand one line into | |
10 | # replacement referer lines, which are referenced -> referer relation. | 10 | # replacement referer lines, which are referenced -> referer relation. | |
11 | 11 | |||
12 | use strict; | 12 | use strict; | |
13 | use Getopt::Std; | 13 | use Getopt::Std; | |
14 | use File::Find; | 14 | use File::Find; | |
15 | 15 | |||
16 | my(%HASH); # referenced -> referer relation hash, referer is delimitted by ; | 16 | my(%HASH); # referenced -> referer relation hash, referer is delimitted by ; | |
17 | my($PKGSRCDIR) = '/usr/pkgsrc'; # /usr/pkgsrc path, usually /usr/pkgsrc | 17 | my($PKGSRCDIR); # /usr/pkgsrc path, usually /usr/pkgsrc | |
18 | 18 | |||
19 | my($TABLE) = 'commonbump'; # name of file, list-of-files to process | 19 | my($TABLE) = 'commonbump'; # name of file, list-of-files to process | |
20 | my(@TABLE); # contents of file above | 20 | my(@TABLE); # contents of file above | |
21 | 21 | |||
22 | my($debug) = 0; | 22 | my($debug) = 0; | |
23 | my($prefix) ; # A part of path, top to pkgsrc, typically /usr/pkgsrc | 23 | my($prefix) ; # A part of path, top to pkgsrc, typically /usr/pkgsrc | |
24 | 24 | |||
25 | my($common_bump) = 0; # count, not used for now (yet) | 25 | my($common_bump) = 0; # count, not used for now (yet) | |
26 | my(%opts); | 26 | my(%opts); | |
27 | our(@ARGV); | 27 | our(@ARGV); | |
28 | 28 | |||
29 | my ($FILE) = __FILE__; | 29 | my ($FILE) = __FILE__; | |
30 | $FILE =~ s,.*/([^/]+),$1,; # pick leafname from __FILE__ | 30 | $FILE =~ s,.*/([^/]+),$1,; # pick leafname from __FILE__ | |
@@ -201,26 +201,32 @@ sub CheckAll() { | @@ -201,26 +201,32 @@ sub CheckAll() { | |||
201 | close(REFERENCED); | 201 | close(REFERENCED); | |
202 | my $number = 0; | 202 | my $number = 0; | |
203 | foreach my $referer (@referer) { | 203 | foreach my $referer (@referer) { | |
204 | $number += grep $referer, $HASH{$i}; | 204 | $number += grep $referer, $HASH{$i}; | |
205 | } | 205 | } | |
206 | $#referer++; # conpensate -1 -> 0, 0 -> 1 etc | 206 | $#referer++; # conpensate -1 -> 0, 0 -> 1 etc | |
207 | if ($#referer < $number) { print $#referer . ' ? ' . $number .' .. ', $i,' <- ', $HASH{$i}, ' ... <', "\n";} | 207 | if ($#referer < $number) { print $#referer . ' ? ' . $number .' .. ', $i,' <- ', $HASH{$i}, ' ... <', "\n";} | |
208 | if ($#referer > $number) { print $#referer . ' ? ' . $number .' .. ', $i,' <- ', $HASH{$i}, ' ... >', "\n";} | 208 | if ($#referer > $number) { print $#referer . ' ? ' . $number .' .. ', $i,' <- ', $HASH{$i}, ' ... >', "\n";} | |
209 | } | 209 | } | |
210 | } | 210 | } | |
211 | sub main() { | 211 | sub main() { | |
212 | my($check_all) = 0; | 212 | my($check_all) = 0; | |
213 | my($prefix); | 213 | my($prefix); | |
214 | ||||
215 | $PKGSRCDIR = $ENV{PKGSRCDIR}; | |||
216 | if (! $PKGSRCDIR) { | |||
217 | $PKGSRCDIR = "/usr/pkgsrc"; | |||
218 | } | |||
219 | ||||
214 | getopts('ahp:T:', \%opts); | 220 | getopts('ahp:T:', \%opts); | |
215 | 221 | |||
216 | if ($opts{'a'}) { $check_all = 1; } | 222 | if ($opts{'a'}) { $check_all = 1; } | |
217 | if ($opts{'h'}) { usage(); exit 0;} | 223 | if ($opts{'h'}) { usage(); exit 0;} | |
218 | if ($opts{'p'}) { $PKGSRCDIR = $opts{'p'};} | 224 | if ($opts{'p'}) { $PKGSRCDIR = $opts{'p'};} | |
219 | if ($opts{'T'}) { $TABLE = $opts{'T'};} | 225 | if ($opts{'T'}) { $TABLE = $opts{'T'};} | |
220 | 226 | |||
221 | $prefix = $PKGSRCDIR; | 227 | $prefix = $PKGSRCDIR; | |
222 | $prefix =~ s|.*/pkgsrc/(.*)|$1|; | 228 | $prefix =~ s|.*/pkgsrc/(.*)|$1|; | |
223 | CheckPkgsrcTree($PKGSRCDIR); | 229 | CheckPkgsrcTree($PKGSRCDIR); | |
224 | GenerateHash($PKGSRCDIR, $prefix); | 230 | GenerateHash($PKGSRCDIR, $prefix); | |
225 | ReadTable($TABLE); | 231 | ReadTable($TABLE); | |
226 | if ($check_all) { CheckAll(); } | 232 | if ($check_all) { CheckAll(); } |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: replace-commonbump.1,v 1.2 2014/12/16 11:38:54 wiz Exp $ | 1 | .\" $NetBSD: replace-commonbump.1,v 1.3 2015/02/09 00:58:44 snj Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c) 2014 The NetBSD Foundation, Inc. | 3 | .\" Copyright (c) 2014 The NetBSD Foundation, Inc. | |
4 | .\" | 4 | .\" | |
5 | .\" This code was originally contributed to the NetBSD Foundation, Inc. | 5 | .\" This code was originally contributed to the NetBSD Foundation, Inc. | |
6 | .\" by Makoto Fujiwara <mef@NetBSD.org>. | 6 | .\" by Makoto Fujiwara <mef@NetBSD.org>. | |
7 | .\" | 7 | .\" | |
8 | .\" Redistribution and use in source and binary forms, with or without | 8 | .\" Redistribution and use in source and binary forms, with or without | |
9 | .\" modification, are permitted provided that the following conditions | 9 | .\" modification, are permitted provided that the following conditions | |
10 | .\" are met: | 10 | .\" are met: | |
11 | .\" 1. Redistributions of source code must retain the above copyright | 11 | .\" 1. Redistributions of source code must retain the above copyright | |
12 | .\" notice, this list of conditions and the following disclaimer. | 12 | .\" notice, this list of conditions and the following disclaimer. | |
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
14 | .\" notice, this list of conditions and the following disclaimer in | 14 | .\" notice, this list of conditions and the following disclaimer in | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND | 21 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND | |
22 | .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | 22 | .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
23 | .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | 23 | .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
24 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 24 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
25 | .\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY | 25 | .\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY | |
26 | .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 26 | .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | 27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | |
28 | .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 28 | .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
29 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | 29 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | |
30 | .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 30 | .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
31 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | 31 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
32 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
33 | .\" | 33 | .\" | |
34 | .Dd December 14, 2014 | 34 | .Dd February 9, 2015 | |
35 | .Dt REPLACE-COMMONBUMP 1 | 35 | .Dt REPLACE-COMMONBUMP 1 | |
36 | .Os | 36 | .Os | |
37 | .Sh NAME | 37 | .Sh NAME | |
38 | .Nm replace-commonbump | 38 | .Nm replace-commonbump | |
39 | .Nd tool to help expanding (replacing) commonbump file to the real list of Makefiles | 39 | .Nd tool to help expanding (replacing) commonbump file to the real list of Makefiles | |
40 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS | |
41 | .Nm | 41 | .Nm | |
42 | .Op Fl ah | 42 | .Op Fl ah | |
43 | .Op Fl p Ar pkgsrcdir | 43 | .Op Fl p Ar pkgsrcdir | |
44 | .Op Fl T Ar list_file | 44 | .Op Fl T Ar list_file | |
45 | .Sh DESCRIPTION | 45 | .Sh DESCRIPTION | |
46 | .Nm | 46 | .Nm | |
47 | is a perl script for pkgsrc developers. | 47 | is a perl script for pkgsrc developers. | |
@@ -110,18 +110,23 @@ which usually lists | @@ -110,18 +110,23 @@ which usually lists | |||
110 | or | 110 | or | |
111 | .Pa *common.mk | 111 | .Pa *common.mk | |
112 | files to be expanded. | 112 | files to be expanded. | |
113 | .It | 113 | .It | |
114 | Expand the filenames listed in | 114 | Expand the filenames listed in | |
115 | .Pa commonbump | 115 | .Pa commonbump | |
116 | into the list of packagename/Makefile by the | 116 | into the list of packagename/Makefile by the | |
117 | referenced -> referer relation. | 117 | referenced -> referer relation. | |
118 | .Nm | 118 | .Nm | |
119 | then outputs to the file | 119 | then outputs to the file | |
120 | .Pa commonbump.replaced | 120 | .Pa commonbump.replaced | |
121 | (currently the name is fixed). | 121 | (currently the name is fixed). | |
122 | .El | 122 | .El | |
123 | .Sh ENVIRONMENT | |||
124 | .Ev PKGSRCDIR | |||
125 | pkgsrc root directory. | |||
126 | Defaults to | |||
127 | .Pa /usr/pkgsrc . | |||
123 | .Sh SEE ALSO | 128 | .Sh SEE ALSO | |
124 | .Xr blbump 1 , | 129 | .Xr blbump 1 , | |
125 | .Xr check-cvs-diff 1 , | 130 | .Xr check-cvs-diff 1 , | |
126 | .Xr finddepends 1 , | 131 | .Xr finddepends 1 , | |
127 | .Xr revbump 1 | 132 | .Xr revbump 1 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: revbump.1,v 1.23 2014/12/16 11:38:54 wiz Exp $ | 1 | .\" $NetBSD: revbump.1,v 1.24 2015/02/09 00:58:44 snj Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c) 2003, 2004, 2005, 2006, 2010, 2012, 2013, 2014 The NetBSD Foundation, Inc. | 3 | .\" Copyright (c) 2003, 2004, 2005, 2006, 2010, 2012, 2013, 2014 The NetBSD Foundation, Inc. | |
4 | .\" | 4 | .\" | |
5 | .\" This code was originally contributed to the NetBSD Foundation, Inc. | 5 | .\" This code was originally contributed to the NetBSD Foundation, Inc. | |
6 | .\" by Julio Merino <jmmv@NetBSD.org> and Thomas Klausner <wiz@NetBSD.org>. | 6 | .\" by Julio Merino <jmmv@NetBSD.org> and Thomas Klausner <wiz@NetBSD.org>. | |
7 | .\" | 7 | .\" | |
8 | .\" Redistribution and use in source and binary forms, with or without | 8 | .\" Redistribution and use in source and binary forms, with or without | |
9 | .\" modification, are permitted provided that the following conditions | 9 | .\" modification, are permitted provided that the following conditions | |
10 | .\" are met: | 10 | .\" are met: | |
11 | .\" 1. Redistributions of source code must retain the above copyright | 11 | .\" 1. Redistributions of source code must retain the above copyright | |
12 | .\" notice, this list of conditions and the following disclaimer. | 12 | .\" notice, this list of conditions and the following disclaimer. | |
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
14 | .\" notice, this list of conditions and the following disclaimer in | 14 | .\" notice, this list of conditions and the following disclaimer in | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND | 21 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND | |
22 | .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | 22 | .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
23 | .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | 23 | .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
24 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 24 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
25 | .\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY | 25 | .\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY | |
26 | .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 26 | .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | 27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | |
28 | .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 28 | .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
29 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | 29 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | |
30 | .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 30 | .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
31 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | 31 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
32 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
33 | .\" | 33 | .\" | |
34 | .Dd August 22, 2014 | 34 | .Dd February 9, 2015 | |
35 | .Dt REVBUMP 1 | 35 | .Dt REVBUMP 1 | |
36 | .Os | 36 | .Os | |
37 | .Sh NAME | 37 | .Sh NAME | |
38 | .Nm revbump | 38 | .Nm revbump | |
39 | .Nd tool to help bump PKGREVISIONs automatically | 39 | .Nd tool to help bump PKGREVISIONs automatically | |
40 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS | |
41 | .Nm | 41 | .Nm | |
42 | .Op Fl h | 42 | .Op Fl h | |
43 | .Op Fl p Ar pkgsrcdir | 43 | .Op Fl p Ar pkgsrcdir | |
44 | .Op cat1/pkg1 ... catN/pkgN | 44 | .Op cat1/pkg1 ... catN/pkgN | |
45 | .Sh DESCRIPTION | 45 | .Sh DESCRIPTION | |
46 | .Nm | 46 | .Nm | |
47 | is a perl script for pkgsrc developers that simplifies bumping | 47 | is a perl script for pkgsrc developers that simplifies bumping | |
@@ -90,18 +90,23 @@ grep buildlink3.mk allbump | sed 's/.bui | @@ -90,18 +90,23 @@ grep buildlink3.mk allbump | sed 's/.bui | |||
90 | grep -e Makefile.common -e mk$ allbump | grep -v -e buildlink3.mk -e options.mk > commonbump ; | 90 | grep -e Makefile.common -e mk$ allbump | grep -v -e buildlink3.mk -e options.mk > commonbump ; | |
91 | replace-commonbump ; | 91 | replace-commonbump ; | |
92 | cat allbump commonbump.replaced | sed 's,/[^/]*$,,' | sort -u \*[Gt] makebump ; | 92 | cat allbump commonbump.replaced | sed 's,/[^/]*$,,' | sort -u \*[Gt] makebump ; | |
93 | revbump \*[Lt] makebump | tee makebump.manual ; | 93 | revbump \*[Lt] makebump | tee makebump.manual ; | |
94 | # [if a package is listed in makebump.manual, handle the PKGREVISION bump manually] | 94 | # [if a package is listed in makebump.manual, handle the PKGREVISION bump manually] | |
95 | blbump \*[Lt] bl3bump | tee bl3bump.manual ; | 95 | blbump \*[Lt] bl3bump | tee bl3bump.manual ; | |
96 | # [handle the *ABI_DEPENDS* bumps in bl3bump.manual manually, usually none] ; | 96 | # [handle the *ABI_DEPENDS* bumps in bl3bump.manual manually, usually none] ; | |
97 | cvs diff -u `cat makebump` > cvs-diff ; | 97 | cvs diff -u `cat makebump` > cvs-diff ; | |
98 | check-cvs-diff ; | 98 | check-cvs-diff ; | |
99 | cvs diff `cat bl3bump makebump` | less | 99 | cvs diff `cat bl3bump makebump` | less | |
100 | cvs commit `cat bl3bump makebump` | 100 | cvs commit `cat bl3bump makebump` | |
101 | rm allbump bl3bump* makebump* commonbump* cvs-diff | 101 | rm allbump bl3bump* makebump* commonbump* cvs-diff | |
102 | .Ed | 102 | .Ed | |
103 | .Sh ENVIRONMENT | |||
104 | .Ev PKGSRCDIR | |||
105 | pkgsrc root directory. | |||
106 | Defaults to | |||
107 | .Pa /usr/pkgsrc . | |||
103 | .Sh SEE ALSO | 108 | .Sh SEE ALSO | |
104 | .Xr blbump 1 , | 109 | .Xr blbump 1 , | |
105 | .Xr check-cvs-diff 1 , | 110 | .Xr check-cvs-diff 1 , | |
106 | .Xr finddepends 1 , | 111 | .Xr finddepends 1 , | |
107 | .Xr replace-commonbump 1 | 112 | .Xr replace-commonbump 1 |