Re: Re: pyrus woes
| From: | Gregory Beaver | Date: | Thu, 08 Jul 2010 16:51:44 +0000 |
| Subject: | Re: Re: pyrus woes | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53625@lists.php.net to get a copy of this message | ||
Too much magic.
Is it really so hard to
pyrus . install foo
?
Don't forget the majority of pear-general newbie problems come from
things going in a different location than expected
Greg
On Jul 8, 2010, at 11:03 AM, till <till@php.net> wrote:
> On Thu, Jul 8, 2010 at 4:57 PM, Brett Bieber <brett.bieber@gmail.com> wrote:
>> On Wed, Jul 7, 2010 at 5:31 PM, till <till@php.net> wrote:
>>> On Tue, Jun 29, 2010 at 4:30 PM, till <till@php.net> wrote:
>>>> 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. ;-)
>>>
>>> Any comments on my last question/proposal/request? I know I'm needy. :D
>>
>> IIRC this was how pyrus functioned initially, but caused quite a few
>> un-necessary dirs to be created throughout the filesystem. I'm not
>> against this as an idea, but I'd prefer it to be an opt-in sort of
>> thing by setting the pyrus my_pear_path to '.' via something like
>> "pyrus mypear ." or "pyrus mypear .:/usr/share/pyrus" — doesn't
>> work
>> ATM, but we certainly could make it work.
>>
>> How does that sound?
>
> Well, I imagine the following:
>
> Say I'm in: /home/till/foo/bar/project and execute: pyrus install foo
>
> It would then check for a pear install like this:
> /home/till/foo/bar/project
> /home/till/foo/bar/
> /home/till/foo/
> /home/till/
> /home/
> /
> /global/system/default
>
> I don't mean to create/setup anything. For all I care is, I'd like it
> to recognize the next install relative to where I am.
>
> If I wanted to create one, I could do something like: pyrus mypear $PWD
>
> Till