Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jun 2003 22:56:37 +0000 (UTC)
From:      naddy@mips.inka.de (Christian Weisgerber)
To:        freebsd-ports@freebsd.org
Subject:   Re: portlint's FATAL warnings
Message-ID:  <bcg975$1gok$1@kemoauc.mips.inka.de>
References:  <20030612222636.GA27898@mail.it.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
Paul Chvostek <paul+fbsd@it.ca> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bcg975$1gok$1>