Re: Solar, Pear, and Pyrus
| From: | Paul M Jones | Date: | Mon, 15 Sep 2008 22:09:33 +0000 |
| Subject: | Re: Solar, Pear, and Pyrus | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50766@lists.php.net to get a copy of this message | ||
On Sep 15, 2008, at 16:43 , Brett Bieber wrote:
Shield your eyes: this is ugly, if not an outright horror. :-/ In the bash script for a solar-system release, I'm doing this after installing PEAR to the system (note that $DIR is the fully-qualified root directory path): {{code: bashAh, great! It's a possible solution at least. Care to share? ;-)Yes, that makes sense. I've figured a way to modify those files automatically so they revert to their "raw" behavior (i.e., so they think they are part of an SCM repo). But that's only for those particular files at installation time, not a solution for the pear installer in general.* How well doThis depends on the package(s), as some need absolute paths to the pear configured directories - you note some of those packages below.pearinstallations work when you commit the installed libraries to an SCM repository (cvs, svn, git, etc), and then check the code out to a *different* base directory on the target servers?
# fix pear binaries so they don't have hard-coded names
OLD="$DIR/source/pear/php"
NEW="@php_dir@"
for FILE in \
"./source/pear/bin/pear" \
"./source/pear/bin/peardev" \
"./source/pear/bin/pecl"
do
sed -i '' s~"$OLD"~"$NEW"~ $FILE
done
# fix pear scripts so they don't have hard-coded names
OLD="$DIR/source/pear/php"
NEW="@include_path@"
for FILE in \
"./source/pear/php/pearcmd.php" \
"./source/pear/php/peclcmd.php"
do
sed -i '' s~"$OLD"~"$NEW"~ $FILE
done
}}
Basically, it replaces the full hard-coded paths with '@php_dir@' and '@include_dir@' so it looks like a raw, uninstalled PEAR structure.
Again, this is only for the initial installation of the base PEAR files, not for every file that gets installed/updated by PEAR afterwards.
That's fair -- if you want, contact me off-list with details and maybe I can donate some time & effort from my copious available resources. ;-) -- Paul M. Jones http://paul-m-jones.com/Regarding pyrus: even if not ready for prime-time, is it "good enough" to install the current PEAR packages? I'm not trying to bitch and moan; if it's not ready, it's not ready. I'm just trying to discover my options. :-)There is one major obstacle to using the CLI for pyrus now, and that's initializing new registries - which is essential for anyone getting started, and I haven't had time to fix it yet. :-(