Changeset 72167


Ignore:
Timestamp:
Oct 5, 2010, 9:37:48 PM (10 years ago)
Author:
wsiegrist@…
Message:

Do not lint deleted portfiles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/portmgr/jobs/portfile_lint.pl

    r71020 r72167  
    1414my $REPOHOST = "http://svn.macosforge.org/repository/macports";
    1515my $SVNLOOK = "/opt/local/bin/svnlook";
     16
     17# use a release (non-trunk) version of port
    1618my $PORTCMD = "/opt/local/bin/port";
     19
    1720my $SVN = "/opt/local/bin/svn -Nq --non-interactive";
    1821my $MKDIR = "/bin/mkdir -p";
     
    3033
    3134foreach my $change (@changes) {
    32     if ($change =~ /Portfile/) {
     35    if ($change =~ /[AU][\sU]\s\s[\/\w\-_]+Portfile$/) {
    3336        # remove svn status and whitespace
    3437        chop($change);
    35         $change =~ s/[ADU_][\sU]\s\s([\/\w]+)/$1/g;
     38        $change =~ s/[ADU_][\sU]\s\s([\/\w\-_]+)/$1/g;
    3639        # extract the portname from parent dir of Portfile
    3740        my $port = $change;
     
    4245        $group =~ s/^.*\/([^\/]+)\/[^\/]+\/Portfile$/$1/g;     
    4346
     47        # get the parent directory of the Portfile
     48        my $parent = $change;
     49        $parent =~ s/Portfile//;
     50
    4451        _log("Port: $group / $port ");
    4552
     
    4754        `$MKDIR $TMPROOT/$group/$port`;
    4855        chdir("$TMPROOT/$group/$port") or die("Failed to change dir for port: $port"); 
    49         `$SVN co $REPOHOST/trunk/dports/$group/$port/ .`;
     56        `$SVN co -r $rev $REPOHOST/$parent .`;
    5057        # test the port
    5158        _lint($port);
     
    8087    my ($port, $maintainers, $errors) = @_;
    8188
     89    # remove duplicates, such as a maintainer being the author of the commit
     90    $maintainers =~ s/$author//g;
     91
    8292    my %mail = (
    8393             To => "$author, $maintainers",
    8494             From => 'noreply@macports.org',
    8595             Subject => "[$rev] $port Lint Report",
    86              Message => "Portfile: $port\n\n\n$errors \n\n",
     96             Message => "Change: http://trac.macports.org/changeset/$rev\nPortfile: $port\n\n$errors \n\n",
    8797             smtp => 'relay.apple.com',
    8898             );
Note: See TracChangeset for help on using the changeset viewer.