Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2013 13:12:53 +0900 (JST)
From:      TAKATSU Tomonari <tota@FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/177043: [PATCH] ports-mgmt/portlint: Add checking svn status
Message-ID:  <20130317041253.0D50EB81C@rtfm.jp>
Resent-Message-ID: <201303170420.r2H4K0OG003837@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         177043
>Category:       ports
>Synopsis:       [PATCH] ports-mgmt/portlint: Add checking svn status
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 17 04:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     TAKATSU Tomonari
>Release:        FreeBSD 8.2-RELEASE-p9 amd64
>Organization:
none (private)
>Environment:
System: FreeBSD photon.local.lan 8.2-RELEASE-p9 FreeBSD 8.2-RELEASE-p9 #0: Mon Jun 11 23:00:11 UTC 2012
>Description:
- 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)
>How-To-Repeat:
>Fix:

--- portlint-2.14.2_1.patch begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 314389)
+++ Makefile	(working copy)
@@ -6,6 +6,7 @@
 
 PORTNAME=	portlint
 PORTVERSION=	2.14.2
+PORTREVISION=	1
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# none
 DISTFILES=	# none
Index: src/portlint.1
===================================================================
--- src/portlint.1	(revision 314389)
+++ src/portlint.1	(working copy)
@@ -130,10 +130,10 @@
 .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
Index: src/portlint.pl
===================================================================
--- src/portlint.pl	(revision 314389)
+++ src/portlint.pl	(working copy)
@@ -161,6 +161,7 @@
 
 # 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 @@
 		} 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 @@
 			}
 
 			$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'}/);
+			}
 		}
 	}
 
--- portlint-2.14.2_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130317041253.0D50EB81C>