Bug 77787

Summary: [PATCH] bsd.php.mk breaks dependency tracking
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 2005-02-20 16:50:17 UTC
bsd.php.mk supports a mechanism to specify required PHP extensions.
For instance, a port Makefile can include the following to specify
a dependency on PHP's pgsql extension:

USE_PHP=	pgsql

Unfortunately, this mechanism is implemented in such a way that if a
dependency is missing from the ports tree, bsd.php.mk will either
silently drop it from the dependency list, or print an error message
and abort, depending on which make target was specified on the command
line.  This breaks tools such as porteasy which use a port's dependency
list to determine which directories to update.

Fix: Apply attached patch.  This will make bsd.php.mk complain about
unknown extensions but not about known extensions whose port
directories are missing.  Porteasy will be able to correctly
determine the dependency list, and update all dependencies:

$ porteasy -r /home/pcvs -p /tmp/ports -lu databases/phppgadmin
[...]
   archivers/php4-zlib (php4-zlib-4.3.10_2)
   converters/libiconv (libiconv-1.9.2_1)
   databases/php4-pgsql (php4-pgsql-4.3.10_2)
 * databases/phppgadmin (phppgadmin-3.5.1)
   devel/autoconf253 (autoconf-2.53_3)
   devel/autoconf259 (autoconf-2.59_2)
   devel/automake15 (automake-1.5_2,1)
   devel/bison (bison-1.75_2)
   devel/gettext (gettext-0.14.1)
   devel/gmake (gmake-3.80_2)
   devel/libtool13 (libtool-1.3.5_2)
   devel/libtool15 (libtool-1.5.10)
   devel/m4 (m4-1.4.1)
   devel/p5-Locale-gettext (p5-gettext-1.03)
   devel/php4-pcre (php4-pcre-4.3.10_2)
   devel/php4-tokenizer (php4-tokenizer-4.3.10_2)
   lang/perl5.8 (perl-5.8.6_2)
   lang/php4 (php4-4.3.10_2)
   mail/cclient (cclient-2004c1_1,1)
   mail/php4-imap (php4-imap-4.3.10_2)
   misc/help2man (help2man-1.34.2)
   security/php4-openssl (php4-openssl-4.3.10_2)
   sysutils/php4-posix (php4-posix-4.3.10_2)
   textproc/expat2 (expat-1.95.8)
   textproc/php4-ctype (php4-ctype-4.3.10_2)
   textproc/php4-xml (php4-xml-4.3.10_2)
   www/apache2 (apache-2.0.53)
   www/php4-session (php4-session-4.3.10_2)
How-To-Repeat: 
$ porteasy -r /home/pcvs -p /tmp/ports -bu databases/phppgadmin
[...]
Unknown extension ctype.
*** Error code 1

Stop in /tmp/ports/databases/phppgadmin.
$ porteasy -r /home/pcvs -p /tmp/ports -lu databases/phppgadmin
   converters/libiconv (libiconv-1.9.2_1)
 * databases/phppgadmin (phppgadmin-3.5.1)
   devel/autoconf259 (autoconf-2.59_2)
   devel/bison (bison-1.75_2)
   devel/gettext (gettext-0.14.1)
   devel/gmake (gmake-3.80_2)
   devel/libtool13 (libtool-1.3.5_2)
   devel/libtool15 (libtool-1.5.10)
   devel/m4 (m4-1.4.1)
   devel/p5-Locale-gettext (p5-gettext-1.03)
   lang/perl5.8 (perl-5.8.6_2)
   lang/php4 (php4-4.3.10_2)
   misc/help2man (help2man-1.34.2)
   textproc/expat2 (expat-1.95.8)
   www/apache2 (apache-2.0.53)

(several PHP extensions are missing from the dependency list)
Comment 1 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2005-02-20 17:03:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

port infrastructure issue
Comment 2 Kirill Ponomarev freebsd_committer freebsd_triage 2005-02-21 10:08:35 UTC
Responsible Changed
From-To: portmgr->ale

This issue isn't related to file maintained by portmgr, 
so ale@ is the right person to handle it.
Comment 3 Alex Dupre freebsd_committer freebsd_triage 2005-03-14 14:43:57 UTC
State Changed
From-To: open->closed

Fixed, thanks!