ports/63293: bsd.port.mk: OPTIONS interferes with NO_BUILD and NO_INSTALL

Oliver Eikemeier eikemeier at fillmore-labs.com
Tue Feb 24 02:20:10 UTC 2004


>Number:         63293
>Category:       ports
>Synopsis:       bsd.port.mk: OPTIONS interferes with NO_BUILD and NO_INSTALL
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 23 18:20:09 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Eikemeier
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 5.1-CURRENT

>Description:

When OPTIONS is set and no saved options are found (the first run), bsd.port.mk
calls the build and install targets, even when NO_BUILD and NO_INSTALL are set.

I suspected something like this, but credits for discovery go to
Clement Laforet <sheepkiller at cultdeadsheep.org>.

>How-To-Repeat:

This port demonstrates the problem reproducible, even though I'm not sure why it
does pass the build stage sometimes.

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	testport
#	testport/Makefile
#	testport/files
#	testport/files/Makefile
#	testport/pkg-descr
#
echo c - testport
mkdir -p testport > /dev/null 2>&1
echo x - testport/Makefile
sed 's/^X//' >testport/Makefile << 'END-of-testport/Makefile'
X# New ports collection makefile for:	testport
X# Date created:				24 Feb 2004
X# Whom:					Oliver Eikemeier
X#
X# $FreeBSD$
X#
X
XPORTNAME=	testport
XPORTVERSION=	x
XCATEGORIES=	misc
XDISTFILES=
X
XMAINTAINER=	eik at FreeBSD.org
XCOMMENT=	Demonstrates interferences between OPTIONS and NO_BUILD, NO_INSTALL
X
XNO_WRKSUBDIR=	yes
X
XNO_BUILD=	yes
XNO_INSTALL=	yes
X
XOPTIONS=	DUMMY	"never mind"	off
X
Xdo-extract:
X		@${CP} ${FILESDIR}/Makefile ${WRKSRC}
X
X.include <bsd.port.mk>
END-of-testport/Makefile
echo c - testport/files
mkdir -p testport/files > /dev/null 2>&1
echo x - testport/files/Makefile
sed 's/^X//' >testport/files/Makefile << 'END-of-testport/files/Makefile'
Xall:
X	@echo "build should not be called"
X	@false
X
Xinstall:
X	@echo "install should not be called"
X	@false
END-of-testport/files/Makefile
echo x - testport/pkg-descr
sed 's/^X//' >testport/pkg-descr << 'END-of-testport/pkg-descr'
XBuild this port with
X  make clean rmconfig; make install
X
XNo matter whether the OPTIONS dialog is acknowledged or
Xcanceled, the build and install targets in files/Makefile
X(copied to ${WRKSRC}/Makefile should not be executed,
Xsince NO_BUILD and NO_INSTALL are set.
END-of-testport/pkg-descr
exit

>Fix:

I'm not sure if the dummy targets should be conditionalized on _OPTIONS_OK.
Anyway, I might come up with a patch when I had some sleep.

A workaround is to add a dummy build or install target in the affected ports.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list