Date: Fri, 24 Jun 2011 16:16:28 +0400 From: "Ilya A. Arkhipov" <micro@heavennet.ru> To: Alexey Dokuchaev <danfe@freebsd.org> Cc: Chris Rees <crees@freebsd.org>, ports@freebsd.org, Ion-Mihai Tetcu <itetcu@freebsd.org>, Joe Marcus Clarke <marcus@freebsd.org>, kwm@freebsd.org Subject: Re: portlint(1) knobs order: let's make things more logical Message-ID: <BANLkTikqeYV2Asg02%2BpvkGf3inW9yCVqBg@mail.gmail.com> In-Reply-To: <BANLkTin3McVv=8f7LAr_KFUJxNbn-ncw4g@mail.gmail.com> References: <20110622020048.GA83940@FreeBSD.org> <BANLkTi=En%2B7nJgEmKCmBEQMwiV0nbcPhEg@mail.gmail.com> <20110622064224.GB94185@FreeBSD.org> <BANLkTi=s6zYOJJv6%2Bkk%2Bttd7jadmTuaT6w@mail.gmail.com> <20110622160233.8b6156e1.itetcu@FreeBSD.org> <20110622135941.GA99725@FreeBSD.org> <e645505a-06bd-461d-b4a6-3f4436caef24@email.android.com> <BANLkTim%2B46u3H9tUp-EqS1PKKtfKZ2KQTw@mail.gmail.com> <20110623033052.GA23118@FreeBSD.org> <BANLkTi=fiYsp-fJY97TkTyXWOCS0-CrQTg@mail.gmail.com> <20110623083351.GA51681@FreeBSD.org> <BANLkTin3McVv=8f7LAr_KFUJxNbn-ncw4g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
23 ÉÀÎÑ 2011 Ç. 21:52 ÐÏÌØÚÏ×ÁÔÅÌØ Ilya A. Arkhipov <micro@heavennet.ru>ÎÁÐÉÓÁÌ:
> óó: to eitan@eitanadler.com
Hi danfe@, marcus@ and all
What you say about this patch(in attach)?
ps. sorry i can't test patch on my work
--
Best regards.
Ilya A. Arkhipov
[-- Attachment #2 --]
--- C:/Work/portlint/portlint.pl_old ×ò èþí 23 13:42:33 2011
+++ C:/Work/portlint/portlint.pl Ïò èþí 24 15:54:18 2011
@@ -2237,7 +2237,6 @@
}
#
- #
# section 2: PORTNAME/PORTVERSION/...
#
print "OK: checking first section of $file (PORTNAME/...).\n"
@@ -2396,21 +2395,6 @@
}
}
- # check value of LICENSE_COMB
- if ($makevar{LICENSE_COMB} && $makevar{LICENSE_COMB} !~ /^(single|dual|multi$)/) {
- &perror("FATAL", $file, -1, "LICENSE_COMB contains invalid value '$1' - must be one of 'single', 'dual', 'multi'");
- }
-
- # check LICENSE
- if ($makevar{LICENSE} && $makevar{LICENSE} ne '') {
- my $comb = $makevar{LICENSE_COMB} // 'single';
-
- my @tokens = split(/ /, $makevar{LICENSE});
- if ($comb eq 'single' && scalar(@tokens) > 1) {
- &perror("FATAL", $file, -1, "LICENSE contains multiple licenses but LICENSE_COMB is not set to 'dual' or 'multi'");
- }
- }
-
# check the URL
if (($tmp =~ /\nMASTER_SITES[+?]?=[ \t]*([^\n]*)\n/
&& $1 !~ /^[ \t]*$/) || ($makevar{MASTER_SITES} ne '')) {
@@ -2670,7 +2654,7 @@
#
print "OK: checking second section of $file (PATCH*: optional).\n"
if ($verbose);
- $tmp = $sections[$idx];
+ $tmp = $sections[$idx++];
if ($tmp =~ /(PATCH_SITES|PATCH_SITE_SUBDIR|PATCHFILES|PATCH_DIST_STRIP)/) {
&checkearlier($file, $tmp, @varnames);
@@ -2694,7 +2678,6 @@
&checkextra($tmp, 'PATCH_SITES', $file);
- $idx++;
}
push(@varnames, qw(
@@ -2763,12 +2746,45 @@
MAINTAINER COMMENT
));
+ #
+ # section 5: LICENSE
#
- # section 5: *_DEPENDS (may not be there)
+ print "OK: checking fourth section of $file (LICENSE).\n"
+ if ($verbose);
+ $tmp = $sections[$idx++];
+
+ &checkearlier($file, $tmp, @varnames);
+ &checkorder('LICENSE', $tmp, $file, qw(
+LICENSE LICENSE_COMB LICENSE_GROUPS LICENSE_NAME
+LICENSE_TEXT LICENSE_FILE LICENSE_PERMS
+ ));
+
+ # check LICENSE
+ if ($makevar{LICENSE} && $makevar{LICENSE} ne '') {
+ my $comb = $makevar{LICENSE_COMB} // 'single';
+
+ my @tokens = split(/ /, $makevar{LICENSE});
+ if ($comb eq 'single' && scalar(@tokens) > 1) {
+ &perror("FATAL", $file, -1, "LICENSE contains multiple licenses but LICENSE_COMB is not set to 'dual' or 'multi'");
+ }
+ }
+
+ # check value of LICENSE_COMB
+ if ($makevar{LICENSE_COMB} && $makevar{LICENSE_COMB} !~ /^(single|dual|multi$)/) {
+ &perror("FATAL", $file, -1, "LICENSE_COMB contains invalid value '$1' - must be one of 'single', 'dual', 'multi'");
+ }
+
+ push(@varnames, qw(
+LICENSE LICENSE_COMB LICENSE_GROUPS LICENSE_NAME
+LICENSE_TEXT LICENSE_FILE LICENSE_PERMS
+ ));
+
#
- print "OK: checking fourth section of $file (*_DEPENDS).\n"
+ # section 6: *_DEPENDS (may not be there)
+ #
+ print "OK: checking fifth section of $file (*_DEPENDS).\n"
if ($verbose);
- $tmp = $sections[$idx];
+ $tmp = $sections[$idx++];
# Check for direct assignment of BUILD_DEPENDS to RUN_DEPENDS.
if ($tmp =~ /\nRUN_DEPENDS=[ \t]*\${BUILD_DEPENDS}/) {
@@ -2797,7 +2813,6 @@
&checkextra($tmp, '*_DEPENDS', $file);
- $idx++;
}
push(@varnames, @linestocheck);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikqeYV2Asg02%2BpvkGf3inW9yCVqBg>
