diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2017-07-22 01:51:44 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2017-07-22 01:51:44 +0000 |
commit | 5bad22dc5b44c6657ae516c1dea76102b9f1c885 (patch) | |
tree | 9f758871853226d3cf3617e15d9477d4aaa4320e /ports-mgmt/portlint/src | |
parent | 1f3a5f49dd6c6dc601a3dbf0e38dbe42cf0aad9d (diff) |
Notes
Diffstat (limited to 'ports-mgmt/portlint/src')
-rw-r--r-- | ports-mgmt/portlint/src/portlint.pl | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index 5565d9a279e9..a711720f562b 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -15,7 +15,7 @@ # was removed. # # $FreeBSD$ -# $MCom: portlint/portlint.pl,v 1.409 2017/06/04 22:22:22 jclarke Exp $ +# $MCom: portlint/portlint.pl,v 1.413 2017/07/22 01:46:20 jclarke Exp $ # use strict; @@ -50,7 +50,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 17; -my $micro = 9; +my $micro = 10; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -214,7 +214,26 @@ while (<IN>) { close(IN); open(MK, 'Makefile') || die "Makefile: $!"; -my @muses = grep($_ = /^USES[?+]?=\s*(.*)/ && $1, <MK>); +my $ulineno = -1; +my $uulineno = -1; +my @muses = (); +while (my $mline = <MK>) { + if ($uulineno == -1 && $mline =~ /^USE_/) { + $uulineno = $.; + } + if ($mline =~ /^USES[?+]?=\s*(.*)/) { + if ($ulineno == -1) { + $ulineno = $.; + } + if ($1) { + push @muses, split(/\s+/, $1); + } + } +} +if ($uulineno < $ulineno) { + &perror("WARN", 'Makefile', $uulineno, "USE_* seen before USES. ". + "According to the porters-handbook, USES must appear first."); +} foreach my $muse (@muses) { $makevar{USES} .= " " . $muse; } @@ -397,10 +416,6 @@ sub checkdistinfo { my $now = time; if ($1 > $now) { &perror("FATAL", $file, $., "TIMESTAMP is in the future"); - } else { - if ($now - $1 > (30 * 60 * 60 * 24)) { - &perror("WARN", $file, $., "TIMESTAMP is over 30 days old"); - } } next; } @@ -2734,10 +2749,6 @@ DIST_SUBDIR EXTRACT_ONLY foreach my $conflict (split ' ', $makevar{CONFLICTS}) { `$pkg_version -T '$makevar{PKGNAME}' '$conflict'`; my $selfconflict = !$?; - if ($conflict !~ /[<>=-][^-]*[0-9][^-]*$/) { - &perror("WARN", "", -1, "Conflict \"$conflict\" specified too broad. ". - "You should end it with a version number fragment (-[0-9]*)."); - } if ($selfconflict) { &perror("FATAL", "", -1, "Package conflicts with itself. ". "You should remove \"$conflict\" from CONFLICTS."); |