diff options
author | Oliver Eikemeier <eik@FreeBSD.org> | 2004-05-16 10:46:47 +0000 |
---|---|---|
committer | Oliver Eikemeier <eik@FreeBSD.org> | 2004-05-16 10:46:47 +0000 |
commit | 6c992223ae7790c5335bb1bb0e2a436f1a1c01b9 (patch) | |
tree | 7c5eb748a2eb9c0d621a9338aae26d2bd5beea2d /Tools | |
parent | d45fca2e8fd40d5e72a6302fcfa083c06ff93478 (diff) | |
download | ports-6c992223ae7790c5335bb1bb0e2a436f1a1c01b9.tar.gz ports-6c992223ae7790c5335bb1bb0e2a436f1a1c01b9.zip |
FWIIW, spawn fewer processes.
Notes
Notes:
svn path=/head/; revision=109249
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/chkversion.pl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Tools/scripts/chkversion.pl b/Tools/scripts/chkversion.pl index 413e518e12d3..f1cbca3fc0bb 100755 --- a/Tools/scripts/chkversion.pl +++ b/Tools/scripts/chkversion.pl @@ -79,10 +79,17 @@ my $useindex = !-w "$versiondir"; my $versionfile = $useindex - ? "$portsdir/".`cd $portsdir; make -VINDEXFILE` + ? "$portsdir/".`cd $portsdir; /usr/bin/make -VINDEXFILE` : "$versiondir/VERSIONS"; chomp $versionfile; +my %cachedenv = ('WITH_OPENSSL_BASE' => 'yes'); +foreach (qw(ARCH OPSYS OSREL OSVERSION PKGINSTALLVER PORTOBJFORMAT UID)) { + $cachedenv{$_} = `cd $portsdir; /usr/bin/make -V$_`; + chomp $cachedenv{$_}; +} +my $makeenv = join ' ', '/usr/bin/env', map { "$_='$cachedenv{$_}'" } keys %cachedenv; + my %pkgname; sub wanted { @@ -96,7 +103,8 @@ sub wanted { || $File::Find::name =~ m"^$portsdir/([^/]+/[^/]+)$"os && ($File::Find::prune = 1) && ( - $pkgname{$1} = `cd "$File::Find::name"; make -VPKGNAME 2>/dev/null`, + $pkgname{$1} = + `cd "$File::Find::name"; $makeenv /usr/bin/make -VPKGNAME 2>/dev/null`, chomp $pkgname{$1} ); } @@ -152,7 +160,8 @@ if (%backwards) { foreach (sort keys %backwards) { print " - $_: $backwards{$_}\n"; if ($cvsblame && -d "$portsdir/$_/CVS") { - my @cvslog = `cd "$portsdir/$_"; cvs -R log -N -r. Makefile`; + my @cvslog = + `cd "$portsdir/$_"; /usr/bin/cvs -R log -N -r. Makefile`; print map "\t" . $_, grep /^-/ .. /^=/, @cvslog; print "\n"; } |