[43942] trunk/base/portmgr/jobs/portfile_mirror.pl

wsiegrist at apple.com wsiegrist at apple.com
Wed Dec 17 18:59:24 PST 2008


Revision: 43942
          http://trac.macports.org/changeset/43942
Author:   wsiegrist at apple.com
Date:     2008-12-17 18:59:23 -0800 (Wed, 17 Dec 2008)
Log Message:
-----------
Add exclusion list to rev mirroring script

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

Property Changed:
----------------
    trunk/base/portmgr/jobs/portfile_mirror.pl

Modified: trunk/base/portmgr/jobs/portfile_mirror.pl
===================================================================
--- trunk/base/portmgr/jobs/portfile_mirror.pl	2008-12-18 02:51:47 UTC (rev 43941)
+++ trunk/base/portmgr/jobs/portfile_mirror.pl	2008-12-18 02:59:23 UTC (rev 43942)
@@ -1,14 +1,15 @@
 #!/opt/local/bin/perl -w
-###
+##
 # Run "port mirror" for all Portfiles changed in a given revision
 # Created by William Siegrist,
 # e-mail: wsiegrist at apple.com
 # $Id$
-###
-
+##
 use strict;
 use Mail::Sendmail;
 
+my $EXCLUSIONS = ('molden');
+
 my $REPOPATH = "/svn/repositories/macports/";
 my $REPOHOST = "http://svn.macosforge.org/repository/macports";
 my $SVNLOOK = "/opt/local/bin/svnlook";
@@ -30,6 +31,10 @@
 	my $port = $change;
 	$port =~ s/^.*\/([^\/]+)\/Portfile$/$1/g;
 
+	if (in_array($port, $EXCLUSIONS)) {
+		die("Port exclusion: $port \n"); 
+	}
+
 	# get the group directory
 	my $group = $change;
 	$group =~ s/^.*\/([^\/]+)\/[^\/]+\/Portfile$/$1/g;	
@@ -38,7 +43,7 @@
 	`$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
 	_mirror($port);
     }
 }
@@ -83,6 +88,15 @@
 	exit();
 }
 
+sub in_array {
+	my ($needle, @haystack) = @_;
 
+	foreach my $element (@haystack) {
+		if ($element eq $needle) {
+			return 1;
+		}
+	}	
+	return 0;
+}
 
 


Property changes on: trunk/base/portmgr/jobs/portfile_mirror.pl
___________________________________________________________________
Added: svn:keywords
   + Id
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081217/f4bbda12/attachment.html>


More information about the macports-changes mailing list