Allowing one package to virtually "provide" another
| From: | Tim Jackson | Date: | Sat, 10 Mar 2007 20:30:11 +0000 |
| Subject: | Allowing one package to virtually "provide" another | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-45862@lists.php.net to get a copy of this message | ||
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
or whatever.
Is there a way of doing this, such that if I split the package in future, a "pear upgrade" will transparently download Foo_Driver_MySQL to maintain the same set of functionality? I can't find anything in the package2.xml spec about this.
Over in RPM land, we have a tag in our specfiles (equivalent of package.xml) which is called "Provides" that does exactly this. For example:
# First package
...
Name: Foo
Provides: Foo_MySQL
...
# After split, first package:
...
Name: Foo
...
# After split, second package:
...
Name: Foo_MySQL
...
Thanks
Tim