Re: subpackages and bundles
| From: | Stefan Neufeind | Date: | Fri, 04 Jun 2004 14:29:10 +0000 |
| Subject: | Re: subpackages and bundles | ||
| References: | 1 | Groups: | php.pear.core |
| Request: | Send a blank email to pear-core+get-368@lists.php.net to get a copy of this message | ||
On 3 Jun 2004 at 19:26, Greg Beaver wrote:
[...]
> First of all, there are 2 different kinds of sub-packages:
> - sub-packages recognized by the primary package and needed for operation
> - sub-packages that are not essential to the primary package, but must
> be uninstalled when the primary package is uninstalled, or upgraded with
> the primary package.
Hmm okay. But why do they need to be different from the technical
point of view to the current package-structures? You can already have
HTML_Quckform_Controller that includes a de to HTML_Quckform. However
I see that adding an option to automatically / interactively also
install HTML_Quckform_Controller when I try to uninstall
HTML_Quckform makes sense.
[...]
> These issues can be solved using bundles.
>
> package-level bundles would be defined in package.xml for a package
>
> <bundles>
> <bundle type="default"> <!-- default install on "pear install/upgrade
>
> PEAR" -->
> <subpackage type="pkg">Console_Getopt</subpackage>
> <subpackage type="pkg">PEAR_ErrorStack</subpackage>
> <bundle>
> <bundle type="custom" name="minimal">
> <subpackage type="pkg">Console_Getopt</subpackage>
> <bundle>
> <bundles>
In your example: Would ErrorStack be really optional? I won't install
it if it prevents me from getting errors :-) But I think it relates
to the example you mentioned later: e.g. phpDocumentor without
drivers for everything that you won't ever need. But this is what
optional deps are already for - and usually the naming of these sub-
packages should be sufficiently detailed (tell what the subpackage is
for). This way I could install the main app / tool / lib and receive
a list of things from which I can decide to also install them.
But this leads me to another thought: Wouldn't the list of possible
addon-packages be better resolved on the server? E.g. if I install
HTML_QuickForm I don't think it's good to have a reference to
HTML_QuickForm_Controller in there. If I have both packages on a
server and from there install HTML_QuickForm then the server might
know about the additional packages that I *can* install, because it
keeps a database of the packages / deps. This way somebody could come
up with HTML_QuickForm_NewFeature and there wouldn't need to be re-
release HTML_QuickForm just to have updated dependencies to the addon-
packages.
Stefan