Bug 73116

Summary: [PATCH] bug in PHP dependency checks
Product: Ports & Packages Reporter: Dag-Erling Smørgrav <des>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
bsd.php.mk.diff none

Description Dag-Erling Smørgrav 2004-10-25 13:50:18 UTC
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.

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.
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
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-10-25 22:31:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to bsd.php.mk maintainer.
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2004-10-26 07:02:49 UTC
This patch isn't correct, it avoids any checks on the existence of the 
port (and this was my intention) and double checks the existence of the 
variable. A possible solution to your problem is to check the existence 
of the category directory, if the port directory is missing. If it 
exists, then the extension is unknown, otherwise you have to cvsup that 
catergory.

-- 
Alex Dupre
Comment 3 Dag-Erling Smørgrav 2004-10-26 07:48:17 UTC
Alex Dupre <ale@FreeBSD.org> writes:
> This patch isn't correct, it avoids any checks on the existence of the
> port (and this was my intention) and double checks the existence of
> the variable.

The ports system already has a mechanism for verifying the existence
of a port directory (although it is arguably broken, because it only
warns about the missing dependency instead of failing, but that is a
separate issue).  That mechanism requires working *_DEPENDS, which
bsd.php.mk does not provide.

>               A possible solution to your problem is to check the
> existence of the category directory, if the port directory is
> missing. If it exists, then the extension is unknown, otherwise you
> have to cvsup that catergory.

You obviously don't understand how porteasy works.  It updates
individual ports, not entire categories.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no
Comment 4 Alex Dupre freebsd_committer freebsd_triage 2005-03-14 14:43:10 UTC
State Changed
From-To: open->closed

Fixed, thanks!