Re: Re: nested package dependencies
| From: | bertrand Gugger | Date: | Mon, 07 Feb 2005 18:23:59 +0000 |
| Subject: | Re: Re: nested package dependencies | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-36015@lists.php.net to get a copy of this message | ||
Greg Beaver wrote:
It's funny you should ask about this as PEAR 1.4.0a1 nears readiness :) I realized that this exact situation would be necessary sooner rather than later, and this is the reason I implemented dependency groups in package.xml 2.0. Dependencies in package.xml 2.0 are grouped slightly differently. There are 3 kinds of dependencies. Required, optional, and optional groups. The optional groups stick several dependencies together as if they were a single dependency, so that you can install a single feature, such as the HTML_Table/Pager feature. All packages have to list a minimum AND mamximum required php version (use 6.0.0 if you're sure it works with 5.x) and minimum required PEAR installer version (this one is so that people can depend on a newer version of the installer without having to have a package dependency on PEAR). <dependencies> <required> <php> <min>4.2.0</min> <max>6.0.0</max> </php> <pearinstaller> <min>1.4.0a1</min> </pearinstaller> </required> <group name="htmltable" hint="Paged output using HTML_Table"> <package> <name>HTML_Table</name> <min>1.5</min> </package> <package> <name>Pager</name> <min>2.2.5</min> </package> </group> </dependencies> To install, the user simply goes: $ pear install Structures_DataGrid#htmltable and even better, to uninstall both packages in this optional feature: $ pear uninstall Structures_DataGrid#htmltable Greg Bravo, you allready loosed your hair on that ;)Actually, you may use Datagrid with HTML_Table, but without requiring Pager. (if you don't use the paging facility). Pager is a sub-option within the HTML_Table option. So as I said before the situation is a little bit more complex. In fact that could be 2 optional dependencies: HTML_Table alone and HTML_Table+Pager. à+ -- bertrand Gugger (toggg)