Re: Making local installations easier
| From: | Tomas V.V.Cox | Date: | Mon, 29 Sep 2003 12:40:34 +0000 |
| Subject: | Re: Making local installations easier | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22153@lists.php.net to get a copy of this message | ||
Sunday, September 28, 2003, 7:43:33 AM, Greg Beaver wrote:
> Hi,
> All this wrangling over BC raised a good point that I think could be
> resolved easily enough: pear needs to support local installations better
> to allow users to have local copies of PEAR packages for local
> applications. Would there be any opposition to adding a new command
> specifically for local PEAR packages? This would have no affect on
> PECL, as PECL by nature must be a global installation.
> Basically, the local command would search by default ONLY in the ~
> directory for .pearrc, or in windows, in UserDir (Documents and
> Settings/ in XP, other dirs in earlier OSes that I don't know off the
> top of my head, etc.). Someone with OS X would have to enlighten us as
> to whether ~ is the same as it is in linux.
> The difference here between --local and existing --installroot is that
> --local is slightly more intuitive. --local would probably be
> implemented as a wrapper around --installroot with some code to check OS
> and specify the OS-specific ~ directory as the argument.
> I don't know how the web installer would be affected by this change,
> probably not much, since it's already quite versatile.
IMHO this is just a documentation problem. The pear installer was
designed taking in mind this issue. One just need to create a config
file for your user or app. For example:
# getting help
$ pear help options
Options:
-v increase verbosity level (default 1)
-q be quiet, decrease verbosity level
-c file find user configuration in `file'
-C file find system configuration in `file'
-d foo=bar set user config variable
foo' to bar'
-D foo=bar set system config variable foo' to bar'
-G start in graphical (Gtk) mode
-s store user configuration
-S store system configuration
-u foo unset `foo' in the user configuration
-h, -? display help/usage (this message)
-V version information
# generating a custom config file
$ pear -c ~/.pearrc.myapp \
-d php_dir=<somedir> \
-d doc_dir=<somedir> \
-d ext_dir=<somedir> \
-s
# using the custom config file
$ pear -c ~/.pearrc.myapp install Foo
This will install php classes at <somedir>, documentation at <somedir>
and extensions at <somedir>, instead of the system wide paths.
That's all.
--
Tomas V.V.Cox mailto:cox@idecnet.com