Re: Re: pyrus woes
| From: | till | Date: | Tue, 29 Jun 2010 14:30:55 +0000 |
| Subject: | Re: Re: pyrus woes | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53612@lists.php.net to get a copy of this message | ||
On Tue, Jun 29, 2010 at 4:24 PM, Gregory Beaver <greg@chiaraquartet.net> wrote:
> Clearly a tutorial is in order. I may have time to write one today.
> Short answer: there is a LOT of confusion about mypear. The mypear command
> is just an alias for this command:
> pyrus set my_pear_path
> The set command is used to set configuration variables, and the my_pear_path
> variable is stored in your local configuration, because it has no effect on
> the actual pear files at te installation path. It only tells pyrus what
> your DEFAULT installation path should be. If you run pyrus help, look for
> the command description. It is similar to:
> php pyrus.phar [installpath] command <commandargs...>
> If you run:
> pyrus install blah
> pyrus will first look for the my_pear_path. Assume yours is
> /home/user/pear. Pyrus will convert your command implicitly into:
> pyrus /home/user/pear install blah
>
> You can also explicitly provide an install location:
> pyrus /home/another/custom/install install blah
> In this case, my_pear_path is ignored
> Thus what was 2 steps in pear (config-create, install) is 1 in pyrus.
> Compare:
> pear config-create /home/user/pear/pear.conf
> pear -c /home/user/pear/pear.conf install blah
> pyrus /home/user/pear install blah
> my_pear_path also supports an include_path style notation. The first path
> is used as the primary installation path, the others are used to validate
> dependencies (cascading registries). More on this later.
Ok, that makes sense. And thanks for taking the time to elaborate.
I'm just wondering if there is a way to "setup a pear install" in a
directory, and whenever I cd into it, it gets used automatically. And
not the global setup, etc.. So kind of like, I did pear -c
$PWD/pear.conf or something - without actually do it. ;-)
Till
> Greg
>
> On Jun 29, 2010, at 7:56 AM, Chuck Burgess <demon.gene@gmail.com> wrote:
>
> Isn't the "mypear" piece just an arbitrary alias? Such that you'd
> actually
> need to use two aliases in your example, mypear1 and mypear2 maybe?
> CRB
>
>
> On Tue, Jun 29, 2010 at 8:47 AM, till <till@php.net> wrote:
>>
>> On Mon, Jun 28, 2010 at 8:07 PM, Gregory Beaver <greg@chiaraquartet.net>
>> wrote:
>> > pyrus my-pear .:/home/user/commonpear
>> > pyrus . install packagename
>> >
>> > Already does what you want.
>> >
>> > Or, you can skip the first step and pass in the directory for all calls:
>> >
>> > pyrus /path/to/project <anycommand>
>> >
>> > This is easily scripted per-project as well.
>>
>> It's still not all this obvious to me.
>>
>> Let's say I do the following:
>>
>> php pyrus.phar mypear /home/till/project1
>> php pyrus.phar mypear /home/till/project1/subproject
>>
>> cd /home/till/project1/subproject
>> php pyrus.phar install HTTP_Request
>>
>> ... which of my pear "installs" is used?
>>
>>
>> Also, if I do not use "mypear" at all - what is used in this case?
>>
>> $HOME ?
>>
>> Till
>>
>> >
>> > Greg
>> >
>> >
>> >
>> > On Jun 28, 2010, at 11:59 AM, Evert Pot <evert@filemobile.com> wrote:
>> >
>> >>>
>> >>> Also, I noticed that it'll create the .pear directory in $HOME. What
>> >>> about putting it into $PWD instead, or at least letting people decide
>> >>> this? It would be nice to have this per project, self-contained, etc...
>> >>> This would also imply that a local .pear/ directory is always read
>> >>> first.
>> >>
>> >> I really like this. I think, in general, you would want specific
>> >> versions and dependencies per-project, not per-system (or per-user). Having
>> >> pear packages by default in a local directory, instead of a global one would
>> >> be a great idea in my opinion.
>> >>
>> >> Evert
>> >
>>
>> --
>> PEAR Development Mailing List (http://pear.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>