From owner-cvs-all Tue Mar 20 13:33:28 2001 Delivered-To: cvs-all@freebsd.org Received: from mail.musha.org (daemon.musha.org [61.122.44.178]) by hub.freebsd.org (Postfix) with ESMTP id 1A97137B71C; Tue, 20 Mar 2001 13:33:18 -0800 (PST) (envelope-from knu@iDaemons.org) Received: from archon.local.idaemons.org (archon.local.idaemons.org [192.168.1.32]) by mail.musha.org (Postfix) with ESMTP id 67C884D822; Wed, 21 Mar 2001 06:30:42 +0900 (JST) Date: Wed, 21 Mar 2001 06:30:42 +0900 Message-ID: <861yrsunzx.wl@archon.local.idaemons.org> From: "Akinori MUSHA" To: mharo@FreeBSD.org, ports@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/devel/portlint Makefile ports/devel/portlint/src portlint.pl In-Reply-To: <863dc8uofq.wl@archon.local.idaemons.org> References: <200103202054.f2KKsPt13806@freefall.freebsd.org> <863dc8uofq.wl@archon.local.idaemons.org> User-Agent: Wanderlust/2.5.4 (Smooth) SEMI/1.14.2 (=?ISO-8859-1?Q?Daish=F2?= =?ISO-8859-1?Q?ji?=) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) Organization: Associated I. Daemons X-PGP-Public-Key: finger knu@FreeBSD.org X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE MIME-Version: 1.0 (generated by SEMI 1.14.2 - =?ISO-8859-1?Q?=22Daish=F2ji=22?=) Content-Type: text/plain; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At Wed, 21 Mar 2001 06:21:13 +0900, I wrote: > Here's a patch against portlint3 that is equivalent to the changes > I've just made on portlint2: Oops. That one was bogus. Try this one.. --- portlint.pl.orig Wed Mar 21 04:30:36 2001 +++ portlint.pl Wed Mar 21 06:28:15 2001 @@ -947,21 +947,42 @@ opendir(D, $dir) || errx(1, "opendir ."); @ls = readdir(D); closedir(D); + + if (@ls <= 2) { + &perror("FATAL: $dir: empty directory should be removed."); + $problem = 1; + } + foreach my $item (@ls) { next if ($item =~ /^(\.|\.\.|CVS)$/); warncrud("$dir/$item") if (-d "$dir/$item"); - if ($item =~ /~$/) { + if ($item =~ /(~|\.bak)$/ || $item =~ /^#/) { &perror("FATAL: $dir/$item: for safety, be sure to cleanup ". "editor backup files before submitting/committing."); $problem = 1; } - if ($item =~ /\.rej$/ || $item =~ /\.orig$/) { + if ($item =~ /\.(orig|rej)$/) { &perror("FATAL: $dir/$item: for safety, be sure to cleanup ". "patch backup files before submitting/committing."); $problem = 1; } - if (-z "$item") { - &perror("FATAL: $item: empty file and should be removed."); + if ($item =~ /^\./) { + &perror("Warning: $dir/$item: dotfiles are not preferred. ". + "If this file is a dotfile to be installed as an example, ". + "consider importing it as \"dot$item\"."); + } + if ($item =~ /(^|\.)core$/) { + &perror("FATAL: $dir/$item: for safety, be sure to cleanup ". + "core files before committing the port."); + } + if (-l "$dir/$item") { + &perror("Warning: $dir/$item: this is a symlink. ". + "CVS will ignore it."); + } + if (-z "$dir/$item") { + &perror("FATAL: $dir/$item: empty file should be removed. ". + "If it still needs to be there, put a dummy comment ". + "to state that the file is intentionally left empty."); $problem = 1; } } (This fixes some bugs in the original code) -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "We're only at home when we're on the run, on the wing, on the fly" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message