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

wsiegrist at apple.com wsiegrist at apple.com
Mon Feb 11 12:03:42 PST 2008


Revision: 34066
          http://trac.macosforge.org/projects/macports/changeset/34066
Author:   wsiegrist at apple.com
Date:     2008-02-11 12:03:42 -0800 (Mon, 11 Feb 2008)

Log Message:
-----------
changed to work on tmp checkouts so the right rev is linted. Removed non-recursive option to svn to fix a bug where include statements broke linting with a cant read "portvariants"

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-02-11 20:02:11 UTC (rev 34065)
+++ trunk/base/portmgr/jobs/portfile_lint.pl	2008-02-11 20:03:42 UTC (rev 34066)
@@ -11,10 +11,16 @@
 use Mail::Sendmail;
 
 my $REPOPATH = "/svn/repositories/macports/";
+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 $MKDIR = "/bin/mkdir -p";
 
+
 my $rev = $ARGV[0] or usage();
+my $TMPROOT = "/tmp/mp_lint/$rev";
+
 my @changes = `$SVNLOOK changed $REPOPATH -r $rev`;
 
 foreach my $change (@changes) {
@@ -26,6 +32,14 @@
 	my $port = $change;
 	$port =~ s/^.*\/([^\/]+)\/Portfile$/$1/g;
 
+	# get the group directory
+	my $group = $change;
+	$group =~ s/^.*\/([^\/]+)\/[^\/]+\/Portfile$/$1/g;	
+
+	# 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/ .`;
 	# test the port
 	_lint($port);
     }
@@ -38,7 +52,8 @@
 
 sub _lint {
     my ($port) = @_; 
-    my $errors = `sudo $PORTCMD -q lint $port`;
+    my $errors = `$PORTCMD -qc lint`;
+
     if ($errors) {
 	my $maintainers = `$PORTCMD -q info --maintainer $port`;
 	# strip everything but the email addresses

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


More information about the macports-changes mailing list