Re: Re: Allowing one package to virtually "provide" another
| From: | Tim Jackson | Date: | Sun, 25 Mar 2007 14:27:57 +0000 |
| Subject: | Re: Re: Allowing one package to virtually "provide" another | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-46034@lists.php.net to get a copy of this message | ||
Greg Beaver wrote:
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, [...]
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.Thanks for this Greg. I've read: http://pear.php.net/manual/en/guide.developers.package2.dependencies.php and am still not really clear. Can I use this tag *before* the subpackage exists? If so, how does PEAR know that, say, "Foo" is providing the dependency "Foo_Bar" without me explicitly declaring it? (I'm kind of expecting a <provides>Foo_Bar</provides> tag here...) Thanks Tim