ports/174693: [PATCH] ports-mgmt/portlint: Remove checksubdir function
TAKATSU Tomonari
tota at FreeBSD.org
Tue Dec 25 02:40:00 UTC 2012
>Number: 174693
>Category: ports
>Synopsis: [PATCH] ports-mgmt/portlint: Remove checksubdir function
>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: Tue Dec 25 02:40:00 UTC 2012
>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:
- Remove checksubdir function which doesn't make sense because the
FreeBSD ports repository switched to Subversion on July 14th, 2012
- Fix Makefile header
- Bump PORTREVISION
Port maintainer (marcus at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
>How-To-Repeat:
# cd /usr/ports/<category>/<port>
# portlint -c
WARN: no CVS directories. Use -N to check a new port.
0 fatal errors and 1 warning found.
>Fix:
Index: Makefile
===================================================================
--- Makefile (revision 309467)
+++ Makefile (working copy)
@@ -1,5 +1,4 @@
-# Created by: Jun-ichiro itojun Hagino <itojun at itojun.org>
-#
+# Created by: Jun-ichiro itojun Hagino <itojun at itojun.org>
# $FreeBSD$
#
# This port is self contained in the src directory.
@@ -7,6 +6,7 @@
PORTNAME= portlint
PORTVERSION= 2.13.13
+PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= # none
DISTFILES= # none
Index: src/portlint.pl
===================================================================
--- src/portlint.pl (revision 309467)
+++ src/portlint.pl (working copy)
@@ -380,146 +380,6 @@
find(\&find_proc, '.');
- sub checksubdir {
- my $dir = shift;
-
- print "OK: checking CVS status of \"$dir\".\n" if ($verbose);
- opendir DIR, $dir;
- my @filenames = readdir DIR;
- closedir DIR;
-
- my %entries;
- if (-f "$dir/CVS/Entries") {
- open ENTRIES, "<$dir/CVS/Entries";
- while (<ENTRIES>) {
- chomp;
- my @entry = split /\//;
- if ($entry[0] eq 'D') {
- $entries{ $entry[1] } = $entry[0]
- if $entry[1];
- }
- elsif ($entry[0] eq '') {
- if ($entry[2] =~ /^-/) {
- $entries{ $entry[1] } = 'x';
- }
- elsif ($entry[2] eq '0') {
- $entries{ $entry[1] } = 'n';
- }
- else {
- $entries{ $entry[1] } = 'f';
- }
- }
- else {
- &perror("WARN", "", -1, "can not parse CVS line $_");
- }
- }
- close ENTRIES;
- } else {
- &perror("WARN", "", -1, "no CVS directories. Use -N to check a new port.");
- return;
- }
-
- if (-f "$dir/CVS/Entries.Log") {
- open ENTRIES, "<$dir/CVS/Entries.Log";
- while (<ENTRIES>) {
- chomp;
- my $cmd;
- my @entry = split /\//;
- if (/^(.) (.*)$/) {
- $cmd = $1;
- @entry = split /\//, $2;
- }
- else {
- $cmd = 'A';
- @entry = split /\//;
- }
- if ($cmd eq 'A') {
- if ($entry[0] eq 'D') {
- $entries{ $entry[1] } = $entry[0]
- if $entry[1];
- }
- elsif ($entry[0] eq '') {
- if ($entry[2] =~ /^-/) {
- $entries{ $entry[1] } = 'x';
- }
- elsif ($entry[2] eq '0') {
- $entries{ $entry[1] } = 'n';
- }
- else {
- $entries{ $entry[1] } = 'f';
- }
- }
- else {
- &perror("WARN", "", -1, "can not parse CVS line $_");
- }
- }
- elsif ($cmd eq 'R') {
- delete $entries{ $entry[1] }
- if $entry[1];
- }
- # ignore unknown commands
- }
- close ENTRIES;
- }
-
- foreach (@filenames) {
- next
- if /^(?:\.\.?|CVS)$/;
- my $filename = $dir eq '.' ? $_ : "$dir/$_";
- if (-d $filename) {
- if ((!$entries{$_} || $entries{$_} ne 'D') && $filename ne 'work') {
- &perror("FATAL", "", -1, "directory $filename not in CVS.");
- }
- else {
- delete $entries{$_};
- checksubdir($filename);
- }
- }
- else {
- if (!$entries{$_}) {
- &perror("FATAL", "", -1, "file $filename not in CVS.")
- unless (eval { /$ENV{'PL_CVS_IGNORE'}/, 1 } &&
- /$ENV{'PL_CVS_IGNORE'}/);
- }
- elsif ($filename =~ /\.core$/ && $entries{$_}) {
- &perror("FATAL", "", -1, "file $filename ends in ".
- "\".core\". This file can be removed by periodic ".
- "cleanup scripts. Do not include files that end in ".
- "\".core\".");
- }
- elsif ($entries{$_} eq 'D') {
- &perror("FATAL", "", -1, "file $filename is a directory in CVS.");
- }
- elsif ($entries{$_} eq 'x') {
- &perror("FATAL", "", -1, "file $filename is deleted in CVS.");
- }
- elsif ($entries{$_} eq 'n') {
- if (!system("egrep", "-q", "\\\$$rcsidstr\[^\$\]+\\\$", $filename)) {
- &perror("WARN", "", -1, "RCS tag \"\$$rcsidstr\$\" ".
- "should be empty in new file $filename.");
- }
- delete $entries{$_};
- }
- else {
- delete $entries{$_};
- }
- }
- }
-
- while (my ($file, $type) = each %entries) {
- next if $type eq 'x';
- if ($type eq 'D') {
- &perror("FATAL", "", -1, "CVS directory $dir/$file missing");
- }
- else {
- &perror("FATAL", "", -1, "CVS file $dir/$file missing");
- }
- }
- }
-
- checksubdir('.')
- unless $newport;
-
# Check for ports that may break INDEX
my $indexerr = `env LOCALBASE=/nonexistentlocal make $makeenv describe 2>&1 >/dev/null`;
chomp $indexerr;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list