From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Oct 20 11:40:02 2003 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99E0816A4BF for ; Mon, 20 Oct 2003 11:40:02 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30D3843FE0 for ; Mon, 20 Oct 2003 11:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9KIe1FY006561 for ; Mon, 20 Oct 2003 11:40:01 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9KIe1W9006560; Mon, 20 Oct 2003 11:40:01 -0700 (PDT) (envelope-from gnats) Resent-Date: Mon, 20 Oct 2003 11:40:01 -0700 (PDT) Resent-Message-Id: <200310201840.h9KIe1W9006560@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Oliver Eikemeier Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41EB416A4B3; Mon, 20 Oct 2003 11:37:25 -0700 (PDT) Received: from mx2.fillmore-labs.com (lima.fillmore-labs.com [62.138.193.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28A6443F3F; Mon, 20 Oct 2003 11:37:24 -0700 (PDT) (envelope-from eikemeier@fillmore-labs.com) Received: from pd958a163.dip.t-dialin.net ([217.88.161.99] helo=fillmore-labs.com ident=zdgx93ub8zptza0j) by mx2.fillmore-labs.com with asmtp (TLSv1:AES256-SHA:256) (Exim 4.24; FreeBSD 4.9) id 1ABeuA-0009JB-V2; Mon, 20 Oct 2003 20:37:23 +0200 Message-Id: <3F942B57.1050502@fillmore-labs.com> Date: Mon, 20 Oct 2003 20:37:11 +0200 From: Oliver Eikemeier To: FreeBSD-gnats-submit@FreeBSD.org cc: Joe Marcus Clarke Subject: ports/58292: [PATCH] port devel/portlint: first category in CATEGORIES must be base directory X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2003 18:40:02 -0000 >Number: 58292 >Category: ports >Synopsis: [PATCH] port devel/portlint: first category in CATEGORIES must be base directory >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Oct 20 11:40:00 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Oliver Eikemeier >Release: FreeBSD 4.8-STABLE i386 >Organization: Fillmore Labs - http://www.fillmore-labs.com >Environment: System: FreeBSD nuuk.fillmore-labs.com 4.8-STABLE >Description: The usage of NOPORTSDOC seems to be a common error, see PR 53911 and PR 57749. >How-To-Repeat: >Fix: - bsd.port.mk does: .for _CATEGORY in ${CATEGORIES} PKGCATEGORY?= ${_CATEGORY} .endfor _PORTDIRNAME!= ${BASENAME} ${.CURDIR} PORTDIRNAME?= ${_PORTDIRNAME} PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME} which is a little strange, but seems to assumes that the first category listed in CATEGORIES is the base directory of the ports directory. Instead of cleaning the whole mess up, require people to follow this convention. Non-conforming ports are listed in ports/58268. - includes PR ports/57751 - the CATEGORIES <-> language handling in portlint need a rewrite. --- portlint-CATEGORIES.patch begins here --- --- devel/portlint/src/portlint.pl.orig 16 Aug 2003 20:42:44 -0000 +++ devel/portlint/src/portlint.pl 20 Oct 2003 18:23:25 -0000 @@ -543,6 +543,9 @@ if ($_ =~ /^(\%\%PORTDOCS\%\%)?share\/doc\//) { &perror("WARN: $file $.: consider using DOCSDIR macro"); + $sharedocused++; + } elsif ($_ =~ /^(\%\%PORTDOCS\%\%)?\%\%DOCSDIR\%\%/) { + $sharedocused++; } if ($_ =~ /^share\/examples\//) { @@ -875,6 +878,9 @@ } } print "OK: checking for use of NOPORTDOCS.\n" if ($verbose); + if ($whole =~ /NOPORTSDOC/) { + &perror("WARN: NOPORTSDOC found. Do you mean NOPORTDOCS?"); + } if ($sharedocused && $whole !~ /defined\(NOPORTDOCS\)/ && $whole !~ m#(\$[\{\(]PREFIX[\}\)]|$localbase)/share/doc#) { &perror("WARN: use \".if !defined(NOPORTDOCS)\" to wrap ". @@ -1117,6 +1123,12 @@ if (@cat == 0) { &perror("FATAL: CATEGORIES left blank. set it to \"misc\"". " if nothing seems apropriate."); + } + + if ($committer && $makevar{'.CURDIR'} =~ m'/([^/]+)/[^/]+/?$') { + if ($cat[0] ne $1) { + &perror("FATAL: category \"$1\" must be listed first"); + } } #MICHAEL: can these three lang cat checks be combined? --- portlint-CATEGORIES.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: