Re: Question wrt dual-PEAR
| From: | MadCoder | Date: | Mon, 31 Jan 2005 23:19:51 +0000 |
| Subject: | Re: Question wrt dual-PEAR | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35833@lists.php.net to get a copy of this message | ||
Ian Eure wrote:
> On Monday 31 January 2005 02:34 pm, Pierre Habouzit wrote:
>> Hi, I'm interested into PEAR packaging for debian (I'm currently near
>> to be Debian Developper [1]).
>>
>> I'm really interested into web apps packaging in debian, and mostly in
>> php which is the language I use the most for web apps. The thing is
>> that (IMHO) php, especially PEAR isn't in a very good shape in debian.
>>
>> Our major problem is that We (I say *we* because I've talk a bit with
>> PHP debian maintainer that are /de/ /facto/ PEAR maintainer atm) do not
>> have found any good way to maintain two branch of PEAR on the same box.
>> I'll explain :
>>
>> * we have PEAR libraries that are in real debian packages that live
>> in /usr/share/php/
>>
>> * OTOH we would like to have a way to allow a user to install with the
>> 'pear' command his packages into /usr/local/share/php, without
>> having to duplicate the whole /usr/share/php tree.
>>
> I'm not sure about the PEAR installer, but general policy for including
> files in PEAR packages is to use the path from the php_dir down.
>
> e.g.
> require_once 'DB/mysql.php'
>
> so once stuff gets installed, it should be fine, as long as the
> include_path has both install directories.
sure, for that part, I was aware of the simple solution ;)
> The installer is another issue entirely, and I'm not familiar enough with
> it to say how it works or how you can have it's dependencies fulfilled.
>
> I suspect that what would need to happen to make this work is that it
> would need to be modified to support multiple php_dirs. e.g.
>
> php_dir = /usr/share/php:/usr/local/share/php
>
> with a registry in each, the combination of which is used to fulfill
> dependencies. This will probably cause problems if, for example, you have
> DB version x.0.y in /usr/share/php, and you upgrade to x.1.y
> in /usr/local/share/php.
why that ?
I don't see the problem here since we have a really easy solution : only
debian package have any rights to put sth in /usr/share/php
so debian package /should/ have a way to enforce pear to
ignore /usr/local/share/php directory. whereas plain default pear command
install things in /usr/local/share/php but taking /usr/share/php into
consideration.
moreover, since /usr/share/php is installed from debian package, versionned
dependencies are already implied by the apt system, and in fact, even if we
have PEAR::foo in /usr/local/share/php and not in /usr/share/php, debian
will require PEAR::foo to be installed (if a PEAR::bar needs it) even if
the user already has it in the /local/ dir.
AFAIK it's the way perl is handled in debian (and in many linux distros) and
it works quite fine !
--
·O· Pierre Habouzit
··O
OOO http://www.madism.org