Bug 177043 - [PATCH] ports-mgmt/portlint: Add checking svn status
Summary: [PATCH] ports-mgmt/portlint: Add checking svn status
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Joe Marcus Clarke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-17 04:20 UTC by TAKATSU Tomonari
Modified: 2013-04-29 00:20 UTC (History)
1 user (show)

See Also:


Attachments
portlint-2.14.2_1.patch (2.04 KB, patch)
2013-03-17 04:20 UTC, TAKATSU Tomonari
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TAKATSU Tomonari freebsd_committer 2013-03-17 04:20:00 UTC
- Add a checking process with svn status whether unversioned or not,
  instead of checksubdir subroutine which was removed at revision 309558
- Restore PL_SVN_IGNORE to collaborate with ports-mgmt/porttools
- Update man page, accordingly
- Add "$File::Find::prune = 1;" while checking in .svn directory

Port maintainer (marcus@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: SVN)
Comment 1 Edwin Groothuis freebsd_committer 2013-03-17 04:20:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marcus

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Joe Marcus Clarke freebsd_committer 2013-03-24 20:47:22 UTC
State Changed
From-To: open->patched

Patched in my CVS repo pending the next release.
Comment 3 dfilter service freebsd_committer 2013-04-29 00:18:36 UTC
Author: marcus
Date: Sun Apr 28 23:18:23 2013
New Revision: 316769
URL: http://svnweb.freebsd.org/changeset/ports/316769

Log:
  Update to 2.14.3.
  
  * Add support for the PL_SVN_IGNORE environment variable. [1]
  * Promote PORT_OPTIONS:MDOCS to NOPORTDOCS. [2]
  * Add a check for pure FTP or HTTP mirrors in MASTER_SITES. [3]
  
  PR:		177043 [1]
  		177048 [2]
  		177805 [3]
  Submitted by:	tota [1]
  		pclin [2]
  		Tijl Coosemans <tijl@coosemans.org> [3]

Modified:
  head/ports-mgmt/portlint/Makefile
  head/ports-mgmt/portlint/src/portlint.1
  head/ports-mgmt/portlint/src/portlint.pl

Modified: head/ports-mgmt/portlint/Makefile
==============================================================================
--- head/ports-mgmt/portlint/Makefile	Sun Apr 28 23:03:17 2013	(r316768)
+++ head/ports-mgmt/portlint/Makefile	Sun Apr 28 23:18:23 2013	(r316769)
@@ -5,7 +5,7 @@
 #
 
 PORTNAME=	portlint
-PORTVERSION=	2.14.2
+PORTVERSION=	2.14.3
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# none
 DISTFILES=	# none

Modified: head/ports-mgmt/portlint/src/portlint.1
==============================================================================
--- head/ports-mgmt/portlint/src/portlint.1	Sun Apr 28 23:03:17 2013	(r316768)
+++ head/ports-mgmt/portlint/src/portlint.1	Sun Apr 28 23:18:23 2013	(r316769)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-.\"  $MCom: portlint/portlint.1,v 1.11 2010/04/04 18:09:43 marcus Exp $
+.\"  $MCom: portlint/portlint.1,v 1.12 2013/03/24 20:45:05 marcus Exp $
 .\"
 .\" Copyright (c) 1997 by Jun-ichiro Hagino <itojun@itojun.org>.
 .\" All Rights Reserved.  Absolutely no warranty.
@@ -130,10 +130,10 @@ This types of message is used in verbose
 .Sh ENVIRONMENT
 The following environment variables affect the execution of
 .Nm :
-.Bl -tag -width ".Ev PL_CVS_IGNORE"
-.It Ev PL_CVS_IGNORE
+.Bl -tag -width ".Ev PL_SVN_IGNORE"
+.It Ev PL_SVN_IGNORE
 Set to a Perl-compatible regular expression, of patterns
-to ignore when checking to see if files are in the CVS
+to ignore when checking to see if files are in the SVN
 repository.  For example,
 .Li '^\ed+$|^pr-patch$' .
 .It Ev PORTSDIR

Modified: head/ports-mgmt/portlint/src/portlint.pl
==============================================================================
--- head/ports-mgmt/portlint/src/portlint.pl	Sun Apr 28 23:03:17 2013	(r316768)
+++ head/ports-mgmt/portlint/src/portlint.pl	Sun Apr 28 23:18:23 2013	(r316769)
@@ -17,7 +17,7 @@
 # OpenBSD and NetBSD will be accepted.
 #
 # $FreeBSD$
-# $MCom: portlint/portlint.pl,v 1.270 2013/03/10 06:08:07 marcus Exp $
+# $MCom: portlint/portlint.pl,v 1.274 2013/04/28 23:15:04 marcus Exp $
 #
 
 use strict;
@@ -52,7 +52,7 @@ $portdir = '.';
 # version variables
 my $major = 2;
 my $minor = 14;
-my $micro = 2;
+my $micro = 3;
 
 sub l { '[{(]'; }
 sub r { '[)}]'; }
@@ -161,6 +161,7 @@ foreach my $i (@osdep) {
 
 # The PORTSDIR environment variable overrides our defaults.
 $portsdir = $ENV{PORTSDIR} if ( defined $ENV{'PORTSDIR'} );
+$ENV{'PL_SVN_IGNORE'} //= '';
 my $mfile_moved = "${portsdir}/MOVED";
 my $mfile_uids = "${portsdir}/UIDs";
 my $mfile_gids = "${portsdir}/GIDs";
@@ -367,6 +368,8 @@ if ($committer) {
 		} elsif ($_ eq '.svn' && -d) {
 			&perror("FATAL", $fullname, -1, "for safety, be sure to cleanup ".
 				"Subversion files before committing the port.");
+
+			$File::Find::prune = 1;
 		} elsif ($_ eq 'CVS' && -d) {
 			if ($newport) {
 				&perror("FATAL", $fullname, -1, "for safety, be sure to cleanup ".
@@ -374,6 +377,16 @@ if ($committer) {
 			}
 
 			$File::Find::prune = 1;
+		} elsif (-f) {
+			my $fullpath = $makevar{'.CURDIR'}.'/'.$fullname;
+			my $result = `svn status $fullpath`;
+
+			chomp $result;
+			if (substr($result, 0, 1) eq '?') {
+				&perror("FATAL", "", -1, "$fullname not under SVN.")
+					unless (eval { /$ENV{'PL_SVN_IGNORE'}/, 1 } &&
+						/$ENV{'PL_SVN_IGNORE'}/);
+			}
 		}
 	}
 
@@ -1725,7 +1738,7 @@ sub checkmakefile {
 	if ($sharedocused && $whole !~ /defined\s*\(?NOPORTDOCS\)?/
 		&& $whole !~ /def\s*\(?NOPORTDOCS\)?/) {
 		if ($docsused == 0 && $whole !~ m#(\$[\{\(]PREFIX[\}\)]|$localbase)/share/doc#) {
-			&perror("WARN", $file, -1, "use \".if !defined(NOPORTDOCS)\" to wrap ".
+			&perror("WARN", $file, -1, "use \".if \${PORT_OPTIONS:MDOCS}\" to wrap ".
 				"installation of files into $localbase/share/doc.");
 		}
 	} else {
@@ -2484,6 +2497,7 @@ DIST_SUBDIR EXTRACT_ONLY
 		print "OK: seen MASTER_SITES, sanity checking URLs.\n"
 			if ($verbose);
 		my @sites = split(/\s+/, $1 // '');
+		my $ftphttp = 0;
 		my $skipnext = 0;
 		foreach my $i (@sites) {
 			if ($skipnext) {
@@ -2496,12 +2510,16 @@ DIST_SUBDIR EXTRACT_ONLY
 				unless (&is_predefined($i, $file)) {
 					print "OK: URL \"$i\" ok.\n"
 						if ($verbose);
+					$ftphttp++ if ($i =~ /^(ftp|http):/);
 				}
 			} else {
 				print "OK: non-URL \"$i\" ok.\n"
 					if ($verbose);
+				$ftphttp++;
 			}
 		}
+		&perror("WARN", $file, -1, "no ftp/http mirror in MASTER_SITES.  ".
+			"This may break fetch through proxies.") unless ($ftphttp);
 	} else {
 		&perror("WARN", $file, -1, "no MASTER_SITES found. is it ok?");
 	}
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Joe Marcus Clarke freebsd_committer 2013-04-29 00:18:58 UTC
State Changed
From-To: patched->closed

Committed, thanks!