Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2000 17:49:43 +0200
From:      Peter Pentchev <roam@orbitel.bg>
To:        mharo@FreeBSD.org
Cc:        knu@FreeBSD.org, ports@FreeBSD.org
Subject:   portlint - minor patches
Message-ID:  <20001212174943.C36405@ringworld.oblivion.bg>

next in thread | raw e-mail | index | archive | help
Hi,

I've stumbled into two minor problems with portlint.  Attached is a patch
that tries to address both of them.

Firstly, for quite some time portlint -abcNv has not worked because
the getopt parameter string incorrectly specified a ':' after 'N'
instead of after 'B', thus also disabling the -B# functionality.

Then, there's the other thing - when checking for contiguous blank
lines, portlint makes an additional effort to not check patchfiles -
it is legitimate for a patch to end with one or more blank lines of
context.  However, the check is slightly broken - it assumes that
filenames are taken relative to the port's directory, while now filenames
are absolute.  Thus, the /^files\/patch-/ match fails, and patchfiles
are also checked for blank lines at the end.

Hope that helps, and keep up the good work! :)

G'luck,
Peter

-- 
You have, of course, just begun reading the sentence that you have just finished reading.

Index: ports/devel/portlint/src/portlint.pl
===================================================================
RCS file: /home/ncvs/ports/devel/portlint/src/portlint.pl,v
retrieving revision 1.24
diff -u -r1.24 portlint.pl
--- ports/devel/portlint/src/portlint.pl	2000/12/12 14:24:12	1.24
+++ ports/devel/portlint/src/portlint.pl	2000/12/12 15:20:34
@@ -97,7 +97,7 @@
 }
 
 
-getopts('abchtvBM:N:V');
+getopts('abchtvB:M:NV');
 
 &usage if $opt_h;
 &version if $opt_V;
@@ -274,7 +274,7 @@
 	} else {
 		my $proc = $checker{$i};
 		&$proc($i) || &perror("Cannot open the file $i\n");
-		if ($i !~ /^files\/patch-/) {
+		if ($i !~ m@/files/patch-@) {
 			&checklastline($i)
 				|| &perror("Cannot open the file $i\n");
 		}


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001212174943.C36405>