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

wsiegrist at apple.com wsiegrist at apple.com
Fri Mar 28 18:33:34 PDT 2008


Revision: 35474
          http://trac.macosforge.org/projects/macports/changeset/35474
Author:   wsiegrist at apple.com
Date:     2008-03-28 18:33:33 -0700 (Fri, 28 Mar 2008)

Log Message:
-----------
Made checkouts non-recursive since lint doesnt rely on actual files/ contents.
Added logging to help debug things server side.

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

Modified: trunk/base/portmgr/jobs/portfile_lint.pl
===================================================================
--- trunk/base/portmgr/jobs/portfile_lint.pl	2008-03-29 01:08:14 UTC (rev 35473)
+++ trunk/base/portmgr/jobs/portfile_lint.pl	2008-03-29 01:33:33 UTC (rev 35474)
@@ -14,7 +14,7 @@
 my $REPOHOST = "http://svn.macosforge.org/repository/macports";
 my $SVNLOOK = "/opt/local/bin/svnlook";
 my $PORTCMD = "/opt/local/bin/port";
-my $SVN = "/opt/local/bin/svn -q --non-interactive";
+my $SVN = "/opt/local/bin/svn -Nq --non-interactive";
 my $MKDIR = "/bin/mkdir -p";
 
 
@@ -23,6 +23,8 @@
 
 my @changes = `$SVNLOOK changed $REPOPATH -r $rev`;
 
+_log("Rev: $rev");
+
 foreach my $change (@changes) {
     if ($change =~ /Portfile/) { 
 	# remove svn status and whitespace
@@ -36,6 +38,8 @@
 	my $group = $change;
 	$group =~ s/^.*\/([^\/]+)\/[^\/]+\/Portfile$/$1/g;	
 
+	_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");	
@@ -55,6 +59,7 @@
     my $errors = `$PORTCMD -qc lint`;
 
     if ($errors) {
+        _log("Error: $errors ");
 	my $maintainers = `$PORTCMD -q info --maintainer $port`;
 	# strip everything but the email addresses
 	$maintainers =~ s/maintainer: //;
@@ -62,6 +67,8 @@
 	$maintainers =~ s/nomaintainer\@macports.org//;
 	chop($maintainers);
 
+	_log("Maintainers: $maintainers ");
+
 	_mail($port, $maintainers, $errors);
     }
 }
@@ -72,19 +79,25 @@
     my %mail = (
 	     To => $maintainers,
 	     From => 'noreply at macports.org',
-	     Subject => "[MacPorts Lint] Portfile Lint Errors for: $port",
-	     Message => "Portfile: $port \n\n\n Errors: $errors \n\n",
+	     Subject => "[$rev] $port Lint Report",
+	     Message => "Portfile: $port\n\n\n$errors \n\n",
 	     smtp => 'relay.apple.com',
 	     );
 
+    _log("Mailto: $maintainers ");
+
     sendmail(%mail) or die $Mail::Sendmail::error;
 }
 
+sub _log {
+	my ($errors) = @_;
+	open(LOG, ">>$TMPROOT/errors") or return;
+	print LOG "$errors\n";
+	close(LOG);
+}
+
 sub usage {
 	print "usage: portfile_lint.pl <rev>\n";
 	exit();
 }
 
-
-
-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080328/ad85d7d1/attachment.html


More information about the macports-changes mailing list