Re: dependencies and applications

From: Date: Wed, 20 Aug 2003 22:25:01 +0000
Subject: Re: dependencies and applications
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20187@lists.php.net to get a copy of this message
Davey wrote:
Greg,
    I have a few comments on what you've said:
Firstly, as you (should) know, packages of the same major version should always have a compatible API and be full backwards compatible. So what we really need is a) for rel="ge" to only pertain to that major version or b) another relationship that makes it only pertain to that major version Secondly, we need to make sure that *all* dependencies are resolved, so that when you first type "pear install phpDocumentor", it will find its own dependencies, then their dependencies and so forth.
I've done some work on implementing this. It requires a rewrite of the PEAR/Installer.php file. Currently, the install() method is a 3-4 page list of code that should be broken into several methods. It both downloads and installs a file, which is bad, and actually makes it impossible to resolve dependencies in a nice way. The issue is that remote installs of files from non-PEAR URLs like http://www.example.com/mypackage-1.0.tgz complicates determination of dependencies.
Lastly, we need to think about having some sort of "slot" system such as they have in Gentoo for their ports, whereby you can install more than one major version of an application. This will mean some changes to the folder structure, and if it happens should be done ASAP so that we can just get the change over and done with IMO. I suggest something along the lines of: $php_dir/pear/MDB/1.0/MDB.php and $php_dir/pear/MDB/2.0/MDB.php
This is better. I really like this idea, and it would work beautifully for dependencies. Definitely a PEAR 2.0 must. Greg

« previous php.pear.dev (#20187) next »