diff options
author | abs <abs@pkgsrc.org> | 2001-08-09 12:35:36 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2001-08-09 12:35:36 +0000 |
commit | c79f42008344a03f92e2e3e9f4ae74aa409e96db (patch) | |
tree | 90e09d5f2a8821e7f66099696bcd55be0858e821 /www | |
parent | 8099f4b4eff7c43a2bacf86188ca8417cddf5e8c (diff) | |
download | pkgsrc-c79f42008344a03f92e2e3e9f4ae74aa409e96db.tar.gz |
Updated checkbot to 1.64nb1
Implement a --skip option
Diffstat (limited to 'www')
-rw-r--r-- | www/checkbot/Makefile | 3 | ||||
-rw-r--r-- | www/checkbot/distinfo | 4 | ||||
-rw-r--r-- | www/checkbot/patches/patch-aa | 75 |
3 files changed, 68 insertions, 14 deletions
diff --git a/www/checkbot/Makefile b/www/checkbot/Makefile index 180c01d69b1..34fe3bbc0f5 100644 --- a/www/checkbot/Makefile +++ b/www/checkbot/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2001/04/24 09:00:26 abs Exp $ +# $NetBSD: Makefile,v 1.9 2001/08/09 12:35:36 abs Exp $ # DISTNAME= checkbot-1.64 +PKGNAME= checkbot-1.64nb1 CATEGORIES= www net perl5 MASTER_SITES= http://degraaff.org/checkbot/ diff --git a/www/checkbot/distinfo b/www/checkbot/distinfo index 1693dfa59b4..ccd1b9a6852 100644 --- a/www/checkbot/distinfo +++ b/www/checkbot/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.3 2001/04/24 09:00:26 abs Exp $ +$NetBSD: distinfo,v 1.4 2001/08/09 12:35:36 abs Exp $ SHA1 (checkbot-1.64.tar.gz) = 14c26e52df4114563b65fac18b38e1463fb786a6 Size (checkbot-1.64.tar.gz) = 26752 bytes -SHA1 (patch-aa) = eca86444f88c551e851b40a962178b361dcce58d +SHA1 (patch-aa) = cb96e473af9b9e18b63ab58a43e00a03455eb16d diff --git a/www/checkbot/patches/patch-aa b/www/checkbot/patches/patch-aa index e8169a5171a..7e949a36a24 100644 --- a/www/checkbot/patches/patch-aa +++ b/www/checkbot/patches/patch-aa @@ -1,17 +1,20 @@ -$NetBSD: patch-aa,v 1.3 2001/04/24 09:00:26 abs Exp $ +$NetBSD: patch-aa,v 1.4 2001/08/09 12:35:36 abs Exp $ --- checkbot.pl.orig Sun Apr 15 20:34:30 2001 +++ checkbot.pl -@@ -47,7 +47,7 @@ +@@ -47,8 +47,9 @@ checkbot [B<--debug>] [B<--help>] [B<--verbose>] [B<--url> start URL] [B<--match> match string] [B<--exclude> exclude string] - [B<--proxy> proxy URL] [B<--internal-only>] +- [B<--ignore> ignore string] [B<-file> file name] ++ [B<--skip> skip string] [B<--ignore> ignore string] + [B<--proxy> proxy URL] [B<--internal-only>] [B<--match-url-base>] - [B<--ignore> ignore string] [B<-file> file name] ++ [B<--file> file name] [B<--style> style file URL] [B<--mailto> email address] -@@ -90,6 +90,11 @@ + [B<--note> note] [B<--sleep> seconds] [B<--timeout> timeout] +@@ -90,6 +91,11 @@ The I<match string> can be a perl regular expression. @@ -23,16 +26,29 @@ $NetBSD: patch-aa,v 1.3 2001/04/24 09:00:26 abs Exp $ =item --exclude <exclude string> URLs matching the I<exclude string> are considered to be external, -@@ -262,7 +267,7 @@ +@@ -97,6 +103,12 @@ + + The I<exclude string> can be a perl regular expression. + ++=item --skip <skip string> ++ ++URLs matching the I<skip string> are not processed. ++ ++The I<skip string> can be a perl regular expression. ++ + =item --ignore <ignore string> + + If a URL has an error, and matches the I<ignore string>, its error +@@ -262,7 +274,7 @@ # Get command-line arguments use Getopt::Long; - my $result = GetOptions(qw(debug help verbose url=s match=s exclude|x=s file=s style=s ignore|z=s mailto|M=s note|N=s proxy=s internal-only sleep=i timeout=i interval=i dontwarn=s enable-virtual)); -+ my $result = GetOptions(qw(debug help verbose url=s match=s exclude|x=s file=s style=s ignore|z=s mailto|M=s note|N=s proxy=s internal-only sleep=i timeout=i interval=i dontwarn=s enable-virtual match-url-base)); ++ my $result = GetOptions(qw(debug help verbose url=s match=s exclude|x=s skip|x=s file=s style=s ignore|z=s mailto|M=s note|N=s proxy=s internal-only sleep=i timeout=i interval=i dontwarn=s enable-virtual match-url-base)); # Handle arguments, some are mandatory, some have defaults &print_help if (($main::opt_help && $main::opt_help) -@@ -273,6 +278,7 @@ +@@ -273,6 +285,7 @@ $main::opt_interval = 10800 unless defined $main::opt_interval and length $main::opt_interval; $main::opt_dontwarn = "xxx" unless defined $main::opt_dontwarn and length $main::opt_dontwarn; $main::opt_enable_virtual = 0 unless defined $main::opt_enable_virtual; @@ -40,7 +56,7 @@ $NetBSD: patch-aa,v 1.3 2001/04/24 09:00:26 abs Exp $ # The default for opt_match will be set later, because we might want # to muck with opt_url first. -@@ -353,7 +359,11 @@ +@@ -353,7 +366,11 @@ my @matchurls; my $matchurl; foreach $matchurl (@starturls) { @@ -53,19 +69,56 @@ $NetBSD: patch-aa,v 1.3 2001/04/24 09:00:26 abs Exp $ } $main::opt_match = '(' . join('|', @matchurls) . ')'; print STDERR "--match defaults to $main::opt_match\n" if $main::opt_verbose; -@@ -781,6 +791,7 @@ +@@ -781,7 +798,9 @@ print OUT "<tr><th align=left>--url</th><td>Start URL(s)</td><td>", join(',', @starturls), "</td></tr>\n"; print OUT "<tr><th align=left>--match</th><td>Match regular expression</td><td>$main::opt_match</td></tr>\n"; + print OUT "<tr><th align=left>--match-url-base</th><td>Match base of each url</td><td>$main::opt_match_url_base</td></tr>\n" if defined $main::opt_match_url_base; print OUT "<tr><th align=left>--exclude</th><td>Exclude regular expression</td><td>$main::opt_exclude</td></tr>\n" if defined $main::opt_exclude; ++ print OUT "<tr><th align=left>--skip</th><td>Skip regular expression</td><td>$main::opt_skip</td></tr>\n" if defined $main::opt_skip; print OUT "<tr><th align=left>--ignore</th><td>Ignore regular expression</td><td>$main::opt_ignore</td></tr>\n" if defined $main::opt_ignore; print OUT "<tr><th align=left>--dontwarn</th><td>Don't warn for these codes</td><td>$main::opt_dontwarn</td></tr>\n" if $main::opt_dontwarn ne 'xxx'; -@@ -1154,6 +1165,7 @@ + print OUT "<tr><th align=left>--enable-virtual</th><td>Use virtual names only</td><td>yes</td></tr>\n" if $main::opt_enable_virtual; +@@ -923,7 +942,7 @@ + add_to_queue($url, $response->base); + $doc_new++; + } +- } else { ++ } elsif (!defined $main::opt_skip || $url !~ /$main::opt_skip/o) { + # Add this as an external link if we can check the protocol later + if ($url =~ /^(http|ftp):/o) { + print EXTERNAL $url . "|" . $response->base . "\n"; +@@ -947,8 +966,12 @@ + sub add_to_queue { + my ($url, $parent) = @_; + +- print QUEUE $url . '|' . $parent . "\n"; +- $main::st_int[$main::TODO]++; ++ if (defined $main::opt_skip && $url =~ /$main::opt_skip/o) { ++ print STDERR "Skip $url\n" if $main::opt_verbose; ++ } else { ++ print QUEUE $url . '|' . $parent . "\n"; ++ $main::st_int[$main::TODO]++; ++ } + } + + sub print_server { +@@ -1142,6 +1165,7 @@ + print " --match match Check pages only if URL matches `match'\n"; + print " If no match is given, the start URL is used as a match\n"; + print " --exclude exclude Exclude pages if the URL matches 'exclude'\n"; ++ print " --skip skip Do not process pages if the URL matches 'skip'\n"; + print " --ignore ignore Do not list error messages for pages that the\n"; + print " URL matches 'ignore'\n"; + print " --file file Write results to file, default is checkbot.html\n"; +@@ -1154,8 +1178,9 @@ print " --interval seconds Maximum time interval between updates (default 10800)\n"; print " --dontwarn codes Do not write warnings for these HTTP response codes\n"; print " --enable-virtual Use only virtual names, not IP numbers for servers\n"; + print " --match-url-base Use the site part of the url in --match\n"; print "\n"; - print "Options --match, --exclude, and --ignore can take a perl regular expression\nas their argument\n\n"; +- print "Options --match, --exclude, and --ignore can take a perl regular expression\nas their argument\n\n"; ++ print "Options --match, --exclude, --skip, and --ignore can take a perl regular\nexpression as their argument\n\n"; print "Use 'perldoc checkbot' for more verbose documentation.\n\n"; + print "Checkbot WWW page : http://degraaff.org/checkbot/\n"; + print "Mail bugs and problems: checkbot\@degraaff.org\n"; |