Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Oct 2004 14:42:11 +0200 (CEST)
From:      Dag-Erling Smørgrav <des@des.no>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/73116: [PATCH] bug in PHP dependency checks
Message-ID:  <20041025124211.70F0FB85E@dwp.des.no>
Resent-Message-ID: <200410251250.i9PCoJx9093927@freefall.freebsd.org>

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

>Number:         73116
>Category:       ports
>Synopsis:       [PATCH] bug in PHP dependency checks
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 25 12:50:18 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Dag-Erling Smørgrav
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD des.teleplan.no 6.0-CURRENT FreeBSD 6.0-CURRENT #7: Tue Oct 19 12:13:59 EDT 2004 des@des.teleplan.no:/usr/obj/usr/src/sys/latitude i386

head of ports tree

>Description:

For each element in USE_PHP, bsd.php.mk checks not only if it knows about
the category but also if the corresponding port directory exists.

>How-To-Repeat:

On a machine with no ports tree, try for instance

# porteasy -r /path/to/ports/cvs/repo -ku devel/pear-PEAR

This will fail because bsd.php.mk blows up before porteasy has a chance to
figure out that it needs to update devel/php4-pear:

===>   pear-Archive_Tar-1.2 depends on executable: pear - not found
===>    Verifying package for pear in /usr/ports/devel/php4-pear
Unknown extension pcre.
*** Error code 1

>Fix:

The attached patch changes the test from "is this extension present" to
"have I heard of this extension", and allows porteasy to work as designed.

--- bsd.php.mk.diff begins here ---
Index: bsd.php.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.php.mk,v
retrieving revision 1.11
diff -u -r1.11 bsd.php.mk
--- bsd.php.mk	2 Sep 2004 10:08:48 -0000	1.11
+++ bsd.php.mk	25 Oct 2004 12:19:04 -0000
@@ -332,7 +332,7 @@
 zlib_DEPENDS=	archivers/php${PHP_VER}-zlib
 
 .	for extension in ${USE_PHP}
-.		if ${_USE_PHP_ALL:M${extension}} != "" && exists(${PORTSDIR}/${${extension}_DEPENDS})
+.		if ${_USE_PHP_ALL:M${extension}} != "" && defined(${extension}_DEPENDS)
 .			if defined(USE_PHP_BUILD)
 BUILD_DEPENDS+=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
 .			endif
--- bsd.php.mk.diff ends here ---


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



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