[72167] trunk/base/portmgr/jobs/portfile_lint.pl

wsiegrist at apple.com wsiegrist at apple.com
Tue Oct 5 14:37:50 PDT 2010


Revision: 72167
          http://trac.macports.org/changeset/72167
Author:   wsiegrist at apple.com
Date:     2010-10-05 14:37:48 -0700 (Tue, 05 Oct 2010)
Log Message:
-----------
Do not lint deleted portfiles.

Modified Paths:
--------------
    trunk/base/portmgr/jobs/portfile_lint.pl

Modified: trunk/base/portmgr/jobs/portfile_lint.pl
===================================================================
--- trunk/base/portmgr/jobs/portfile_lint.pl	2010-10-05 21:16:47 UTC (rev 72166)
+++ trunk/base/portmgr/jobs/portfile_lint.pl	2010-10-05 21:37:48 UTC (rev 72167)
@@ -13,7 +13,10 @@
 my $REPOPATH = "/svn/repositories/macports/";
 my $REPOHOST = "http://svn.macosforge.org/repository/macports";
 my $SVNLOOK = "/opt/local/bin/svnlook";
+
+# use a release (non-trunk) version of port
 my $PORTCMD = "/opt/local/bin/port";
+
 my $SVN = "/opt/local/bin/svn -Nq --non-interactive";
 my $MKDIR = "/bin/mkdir -p";
 
@@ -29,10 +32,10 @@
 _log("Rev: $rev");
 
 foreach my $change (@changes) {
-    if ($change =~ /Portfile/) { 
+    if ($change =~ /[AU][\sU]\s\s[\/\w\-_]+Portfile$/) { 
 	# remove svn status and whitespace
 	chop($change);
-	$change =~ s/[ADU_][\sU]\s\s([\/\w]+)/$1/g;
+	$change =~ s/[ADU_][\sU]\s\s([\/\w\-_]+)/$1/g; 
 	# extract the portname from parent dir of Portfile
 	my $port = $change;
 	$port =~ s/^.*\/([^\/]+)\/Portfile$/$1/g;
@@ -41,12 +44,16 @@
 	my $group = $change;
 	$group =~ s/^.*\/([^\/]+)\/[^\/]+\/Portfile$/$1/g;	
 
+	# get the parent directory of the Portfile
+	my $parent = $change;
+	$parent =~ s/Portfile//;
+
 	_log("Port: $group / $port ");
 
 	# make a temporary work area
 	`$MKDIR $TMPROOT/$group/$port`;
 	chdir("$TMPROOT/$group/$port") or die("Failed to change dir for port: $port");	
-	`$SVN co $REPOHOST/trunk/dports/$group/$port/ .`;
+	`$SVN co -r $rev $REPOHOST/$parent .`;
 	# test the port
 	_lint($port);
     }
@@ -79,11 +86,14 @@
 sub _mail {
     my ($port, $maintainers, $errors) = @_;
 
+    # remove duplicates, such as a maintainer being the author of the commit
+    $maintainers =~ s/$author//g;
+
     my %mail = (
 	     To => "$author, $maintainers",
 	     From => 'noreply at macports.org',
 	     Subject => "[$rev] $port Lint Report",
-	     Message => "Portfile: $port\n\n\n$errors \n\n",
+	     Message => "Change: http://trac.macports.org/changeset/$rev\nPortfile: $port\n\n$errors \n\n",
 	     smtp => 'relay.apple.com',
 	     );
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101005/d5fefdfe/attachment.html>


More information about the macports-changes mailing list