aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2004-05-15 05:07:39 +0800
committereik <eik@FreeBSD.org>2004-05-15 05:07:39 +0800
commit36c1d90a10f181a70e6744db3d785ed2c791dc2e (patch)
tree82be68c90c7af97c0cf7833092feefb6de4460c6 /Tools/scripts
parentbbb5033480e579fe8ade48ffd5e6448a4aabc01e (diff)
downloadfreebsd-ports-graphics-36c1d90a10f181a70e6744db3d785ed2c791dc2e.tar.gz
freebsd-ports-graphics-36c1d90a10f181a70e6744db3d785ed2c791dc2e.tar.zst
freebsd-ports-graphics-36c1d90a10f181a70e6744db3d785ed2c791dc2e.zip
support for symlinked portsdir (but no other symlinks in the ports tree)
chkversion: support for CVS blame with env CVSBLAME=yes
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/chkmodules.pl6
-rwxr-xr-xTools/scripts/chkversion.pl27
2 files changed, 19 insertions, 14 deletions
diff --git a/Tools/scripts/chkmodules.pl b/Tools/scripts/chkmodules.pl
index bf0d39ffc01..d1f97a85774 100755
--- a/Tools/scripts/chkmodules.pl
+++ b/Tools/scripts/chkmodules.pl
@@ -36,11 +36,10 @@
# Clement Laforet.
#
-use strict;
-use File::Find;
-
require 5.005;
use strict;
+use File::Find;
+use Cwd 'abs_path';
my $portsdir = $ENV{PORTSDIR} ? $ENV{PORTSDIR} : '/usr/ports';
my $cvsroot = $ENV{CVSROOT} ? $ENV{CVSROOT} : '/home/ncvs/CVSROOT-ports';
@@ -48,6 +47,7 @@ my @excludes = $ENV{EXCLUDE} ? split(' ', $ENV{EXCLUDE}) : ('local', 'rookies')
-d "$portsdir" or die "Can't find ports tree at $portsdir.\n";
-f "$cvsroot/modules" or die "Can't read modules file $cvsroot/modules.\n";
+$portsdir = abs_path($portsdir);
my %ports = ('ports' => 1);
diff --git a/Tools/scripts/chkversion.pl b/Tools/scripts/chkversion.pl
index 883767d34d8..413e518e12d 100755
--- a/Tools/scripts/chkversion.pl
+++ b/Tools/scripts/chkversion.pl
@@ -58,15 +58,14 @@
# if you can spare the time.
#
-use strict;
-use File::Find;
-
require 5.005;
use strict;
+use File::Find;
+use Cwd 'abs_path';
my $portsdir = $ENV{PORTSDIR} ? $ENV{PORTSDIR} : '/usr/ports';
-
my $versiondir = $ENV{VERSIONDIR} ? $ENV{VERSIONDIR} : '/var/db/chkversion';
+my $cvsblame = $ENV{CVSBLAME} ? 1 : 0;
my $pkg_version =
-x '/usr/local/sbin/pkg_version'
@@ -74,12 +73,13 @@ my $pkg_version =
: '/usr/sbin/pkg_version';
-d "$portsdir" or die "Can't find ports tree at $portsdir.\n";
+$portsdir = abs_path($portsdir);
my $useindex = !-w "$versiondir";
my $versionfile =
$useindex
- ? "$portsdir/`cd $portsdir; make -VINDEXFILE`"
+ ? "$portsdir/".`cd $portsdir; make -VINDEXFILE`
: "$versiondir/VERSIONS";
chomp $versionfile;
@@ -105,7 +105,6 @@ find(\&wanted, $portsdir);
my %backwards;
-
open VERSIONS, "<$versionfile";
while (<VERSIONS>) {
@@ -148,8 +147,14 @@ if (!$useindex) {
close VERSIONS;
}
-print join("\n - ",
- "Package versions going backwards:",
- map("$_: $backwards{$_}", sort keys %backwards)),
- "\n"
- if %backwards;
+if (%backwards) {
+ print "Package versions going backwards:\n";
+ foreach (sort keys %backwards) {
+ print " - $_: $backwards{$_}\n";
+ if ($cvsblame && -d "$portsdir/$_/CVS") {
+ my @cvslog = `cd "$portsdir/$_"; cvs -R log -N -r. Makefile`;
+ print map "\t" . $_, grep /^-/ .. /^=/, @cvslog;
+ print "\n";
+ }
+ }
+}