Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Oct 2004 21:24:41 +0300
From:      Ion-Mihai Tetcu <itetcu@people.tecnik93.com>
To:        ports@FreeBSD.ORG
Subject:   when a port should fail
Message-ID:  <20041014212441.1cc3d851@it.buh.cameradicommercio.ro>

next in thread | raw e-mail | index | archive | help
Hi,


I have a machine on which a script cvsups periodically, parse the cvsup
output and for the ports with new DISTFILES does a make fetch && make
checksum; so it holds DISTFILES for all ports and we use it as
MASTER_SITE for the rest of our machines. Of course it doesn't have
installed all the ports that are on the rest of the machines.

The problem is that some ports seems to like failing in pre-everithing::
because they require some option to be set. Perhaps not even ports
marked by portaudit should fail to fetch, but only to build.

In my opinion this kind of checks should be done in pre-extract (or
pre-patch or pre-configure, but the first saves time), except when the
DISTFILE would differ depending on a particular option (but in this case
there should either be 2 different ports or the DISTFILE could be set
inside some .if .endif, etc.). This would make the ports fetch-able.

I think that the above should be treated in Porters Handbook.


Some other ports, esp. those using OPTIONS sometime don't provide
defaults for those options, thus make -DBATCH ....... fails when make
config wasn't completed, which is the case when the ports hasn't been
previously config / installed on that machine. Perhaps a little emphasis
on this kind of check could be added to Porters Handbook.

So I suggest for the ports really need some option to be set (e.g. no
defaults can be set my the maintainer) that they are marked
IS_INTERACTIVE as per Handbook "4.6 Handling user input" like:
.ifndefined(FOO) && !defined(BAR)
# this port really needs you to set
# FOO to one of {val1,val2,........}
# BAR to one of {val1,val2,........}
IS_INTERACTIVE=	yes
.endif

and not to fail like:
some-target:
.ifndefined(FOO) && !defined(BAR)
	@#{ECHO_CMD} "This port require that FOO is ...."
	exit 1
.endif


The rest should be modified to build with some default options.


-- 
IOnut
Unregistered ;) FreeBSD "user"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041014212441.1cc3d851>