portlint's FATAL warnings

Christian Weisgerber naddy at mips.inka.de
Sat Jun 14 16:31:48 PDT 2003


Paul Chvostek <paul+fbsd at 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 at mips.inka.de



More information about the freebsd-ports mailing list