Re: Allowing one package to virtually "provide" another
| From: | Greg Beaver | Date: | Sun, 11 Mar 2007 13:51:23 +0000 |
| Subject: | Re: Allowing one package to virtually "provide" another | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-45866@lists.php.net to get a copy of this message | ||
Tim Jackson wrote:
> This question is related to the PEAR Installer in general, not to any
> existing or proposed packages on pear.php.net.
>
> Let's say I have an application package called "Foo". This package
> includes support for a "MySQL" database. Right now, I want to package
> "Foo" it as a single package. However, I'm aware that if in future I add
> support for other database backends, I might want to split Foo into
> subpackages, for example:
>
> Foo
> Foo_Driver_MySQL
> Foo_Driver_Postgres
Hi Tim,
Yes, use <subpackage> instead of <package> dependency. so Foo depends on
Foo_Driver_MySQL. If you want the option of not installing all drivers,
use a dependency <group> named "default" containing the Foo_Driver_*
that were present in the original package.
Greg