summaryrefslogtreecommitdiff
path: root/ports-mgmt/portlint/src
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2013-04-28 23:18:23 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2013-04-28 23:18:23 +0000
commitf13ca3cae615e328536d5b1908c664567ab0de2e (patch)
tree23a6bde35e3a314a84c21ee5b58d92c6a017a9c2 /ports-mgmt/portlint/src
parentUpdate to 4.0.4.26 (diff)
Update to 2.14.3.
* Add support for the PL_SVN_IGNORE environment variable. [1] * Promote PORT_OPTIONS:MDOCS to NOPORTDOCS. [2] * Add a check for pure FTP or HTTP mirrors in MASTER_SITES. [3] PR: 177043 [1] 177048 [2] 177805 [3] Submitted by: tota [1] pclin [2] Tijl Coosemans <tijl@coosemans.org> [3]
Notes
Notes: svn path=/head/; revision=316769
Diffstat (limited to 'ports-mgmt/portlint/src')
-rw-r--r--ports-mgmt/portlint/src/portlint.18
-rw-r--r--ports-mgmt/portlint/src/portlint.pl24
2 files changed, 25 insertions, 7 deletions
diff --git a/ports-mgmt/portlint/src/portlint.1 b/ports-mgmt/portlint/src/portlint.1
index 179ced1cce1a..d7b949398d72 100644
--- a/ports-mgmt/portlint/src/portlint.1
+++ b/ports-mgmt/portlint/src/portlint.1
@@ -1,5 +1,5 @@
.\" $FreeBSD$
-.\" $MCom: portlint/portlint.1,v 1.11 2010/04/04 18:09:43 marcus Exp $
+.\" $MCom: portlint/portlint.1,v 1.12 2013/03/24 20:45:05 marcus Exp $
.\"
.\" Copyright (c) 1997 by Jun-ichiro Hagino <itojun@itojun.org>.
.\" All Rights Reserved. Absolutely no warranty.
@@ -130,10 +130,10 @@ This types of message is used in verbose mode
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
-.Bl -tag -width ".Ev PL_CVS_IGNORE"
-.It Ev PL_CVS_IGNORE
+.Bl -tag -width ".Ev PL_SVN_IGNORE"
+.It Ev PL_SVN_IGNORE
Set to a Perl-compatible regular expression, of patterns
-to ignore when checking to see if files are in the CVS
+to ignore when checking to see if files are in the SVN
repository. For example,
.Li '^\ed+$|^pr-patch$' .
.It Ev PORTSDIR
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl
index cea6d1ca6db1..aaa92a572e3d 100644
--- a/ports-mgmt/portlint/src/portlint.pl
+++ b/ports-mgmt/portlint/src/portlint.pl
@@ -17,7 +17,7 @@
# OpenBSD and NetBSD will be accepted.
#
# $FreeBSD$
-# $MCom: portlint/portlint.pl,v 1.270 2013/03/10 06:08:07 marcus Exp $
+# $MCom: portlint/portlint.pl,v 1.274 2013/04/28 23:15:04 marcus Exp $
#
use strict;
@@ -52,7 +52,7 @@ $portdir = '.';
# version variables
my $major = 2;
my $minor = 14;
-my $micro = 2;
+my $micro = 3;
sub l { '[{(]'; }
sub r { '[)}]'; }
@@ -161,6 +161,7 @@ foreach my $i (@osdep) {
# The PORTSDIR environment variable overrides our defaults.
$portsdir = $ENV{PORTSDIR} if ( defined $ENV{'PORTSDIR'} );
+$ENV{'PL_SVN_IGNORE'} //= '';
my $mfile_moved = "${portsdir}/MOVED";
my $mfile_uids = "${portsdir}/UIDs";
my $mfile_gids = "${portsdir}/GIDs";
@@ -367,6 +368,8 @@ if ($committer) {
} elsif ($_ eq '.svn' && -d) {
&perror("FATAL", $fullname, -1, "for safety, be sure to cleanup ".
"Subversion files before committing the port.");
+
+ $File::Find::prune = 1;
} elsif ($_ eq 'CVS' && -d) {
if ($newport) {
&perror("FATAL", $fullname, -1, "for safety, be sure to cleanup ".
@@ -374,6 +377,16 @@ if ($committer) {
}
$File::Find::prune = 1;
+ } elsif (-f) {
+ my $fullpath = $makevar{'.CURDIR'}.'/'.$fullname;
+ my $result = `svn status $fullpath`;
+
+ chomp $result;
+ if (substr($result, 0, 1) eq '?') {
+ &perror("FATAL", "", -1, "$fullname not under SVN.")
+ unless (eval { /$ENV{'PL_SVN_IGNORE'}/, 1 } &&
+ /$ENV{'PL_SVN_IGNORE'}/);
+ }
}
}
@@ -1725,7 +1738,7 @@ sub checkmakefile {
if ($sharedocused && $whole !~ /defined\s*\(?NOPORTDOCS\)?/
&& $whole !~ /def\s*\(?NOPORTDOCS\)?/) {
if ($docsused == 0 && $whole !~ m#(\$[\{\(]PREFIX[\}\)]|$localbase)/share/doc#) {
- &perror("WARN", $file, -1, "use \".if !defined(NOPORTDOCS)\" to wrap ".
+ &perror("WARN", $file, -1, "use \".if \${PORT_OPTIONS:MDOCS}\" to wrap ".
"installation of files into $localbase/share/doc.");
}
} else {
@@ -2484,6 +2497,7 @@ DIST_SUBDIR EXTRACT_ONLY
print "OK: seen MASTER_SITES, sanity checking URLs.\n"
if ($verbose);
my @sites = split(/\s+/, $1 // '');
+ my $ftphttp = 0;
my $skipnext = 0;
foreach my $i (@sites) {
if ($skipnext) {
@@ -2496,12 +2510,16 @@ DIST_SUBDIR EXTRACT_ONLY
unless (&is_predefined($i, $file)) {
print "OK: URL \"$i\" ok.\n"
if ($verbose);
+ $ftphttp++ if ($i =~ /^(ftp|http):/);
}
} else {
print "OK: non-URL \"$i\" ok.\n"
if ($verbose);
+ $ftphttp++;
}
}
+ &perror("WARN", $file, -1, "no ftp/http mirror in MASTER_SITES. ".
+ "This may break fetch through proxies.") unless ($ftphttp);
} else {
&perror("WARN", $file, -1, "no MASTER_SITES found. is it ok?");
}