From owner-freebsd-ports@FreeBSD.ORG Sat Jun 14 16:31:48 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F8B637B404 for ; Sat, 14 Jun 2003 16:31:48 -0700 (PDT) Received: from mail.inka.de (quechua.inka.de [193.197.184.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B682343FBD for ; Sat, 14 Jun 2003 16:31:46 -0700 (PDT) (envelope-from mailnull@mips.inka.de) Received: from kemoauc.mips.inka.de (uucp@) by mail.inka.de with gbsmtp id 19RKUr-0007tm-03; Sun, 15 Jun 2003 01:31:45 +0200 Received: from kemoauc.mips.inka.de (localhost [127.0.0.1]) by kemoauc.mips.inka.de (8.12.9/8.12.6) with ESMTP id h5EMucih049950 for ; Sun, 15 Jun 2003 00:56:38 +0200 (CEST) (envelope-from mailnull@localhost.mips.inka.de) Received: (from mailnull@localhost) by kemoauc.mips.inka.de (8.12.9/8.12.9/Submit) id h5EMuco0049949 for freebsd-ports@freebsd.org; Sun, 15 Jun 2003 00:56:38 +0200 (CEST) From: naddy@mips.inka.de (Christian Weisgerber) Date: Sat, 14 Jun 2003 22:56:37 +0000 (UTC) Message-ID: References: <20030612222636.GA27898@mail.it.ca> Originator: naddy@mips.inka.de (Christian Weisgerber) To: freebsd-ports@freebsd.org Subject: Re: portlint's FATAL warnings X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2003 23:31:48 -0000 Paul Chvostek wrote: > I'm assembling a port that needs to take some liberties either eith the > order of variables or with the method of file collection. I'd like to > know what to compromise, and whether FATAL errors from portlint on a > port that works fine and appears structurally superior is something to > worry about. No, it isn't. portlint supplies valuable hints and is quite useful for catching accidental mistakes. However, it is also a fairly stupid script and its pronouncements should not be taken as religion. There might be good reasons to handle something in a way that generates a warning. > FATAL: URL "http://hostname/path/:0" should end with "/". That's a shortcoming in portlint. It doesn't understand master site groupings. > FATAL: extra item "EXTRACT_ONLY" placed in the MAINTAINER section. > FATAL: extra item "MASTER_SITES" placed in the MAINTAINER section. > FATAL: extra item "DISTFILES" placed in the MAINTAINER section. It also tends to get confused by .if blocks. > As I say, this all *works*, but it's complex and generates erroneous > complaints. A "simple" solution is to use: > > post-fetch: > @test -f ${DISTDIR}/somefile.html || \ > ${FETCH_CMD} -o ${DISTDIR} http://hostname/path/somefile.html You are working around the existing bsd.port.mk infrastructure here. I find this approach objectionable. > (I use `test -f` because ${DISTDIR} doesn't seem to be recognized inside > a .if exists().) make(1) uses lazy evaluation. Conditionals and loops are evaluated at the time the line is parsed, and DISTDIR isn't set yet. -- Christian "naddy" Weisgerber naddy@mips.inka.de