Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.15

Bug #5448 pear install --installroot broken
Submitted: 2005-09-18 14:46 UTC
From: glen at delfi dot ee Assigned:
Status: Duplicate Package: PEAR
PHP Version: 5.0.5 OS: PLD Linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-09-18 14:46 UTC] glen at delfi dot ee
Description: ------------ pear --installroot leaves the installroot into @@-replacement variables. Test script: --------------- $ pear install --installroot=/tmp/kokojambo --nodeps PEAR-1.4.0RC2.tgz $ grep -C1 kokojambo /tmp/kokojambo/usr/bin/pear else if test "/tmp/kokojambo/usr/share/pear" = '@'php_dir'@'; then INCDIR=`dirname $0` -- else INCDIR="/tmp/kokojambo/usr/share/pear" INCARG="-d include_path=/tmp/kokojambo/usr/share/pear" fi Expected result: ---------------- $INSTALLROOT not being stored in output files: else if test "/usr/share/pear" = '@'php_dir'@'; then INCDIR=`dirname $0` -- else INCDIR="/usr/share/pear" INCARG="-d include_path=/usr/share/pear" fi

Comments

 [2005-09-18 15:19 UTC] glen at delfi dot ee
gehenna(wintersunset) distfiles # pear install --installroot=/tmp/kokojambo --nodeps PEAR-1.3.5.tgz install ok: PEAR 1.3.5 gehenna(wintersunset) distfiles # less /tmp/kokojambo/usr/bin/pear #!/bin/sh # first find which PHP binary to use if test "x$PHP_PEAR_PHP_BIN" != "x"; then PHP="$PHP_PEAR_PHP_BIN" else if test "/usr/bin/php" = '@'php_bin'@'; then PHP=php else PHP="/usr/bin/php" fi fi # then look for the right pear include dir if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then INCDIR=$PHP_PEAR_INSTALL_DIR INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR" else if test "/usr/lib/php" = '@'php_dir'@'; then INCDIR=`dirname $0` INCARG="" else INCDIR="/usr/lib/php" INCARG="-d include_path=/usr/lib/php" fi fi exec $PHP -C -q $INCARG -d output_buffering=1 $INCDIR/pearcmd.php "$@"
 [2005-09-18 15:33 UTC] toggg
It seems your goal is not clearly identified, please, forget the code and tell what you want to do.
 [2005-09-18 15:34 UTC] pajoye
I do not think that the behavior in 1.3.x is correct. Secondly, having discussed your problem on irc, I do not think any Linux distribution are doing things correctly. PEAR pkgs should keep everything updated and uses the pear install er to install/upgrade package. I will come later this week with some docs about that.
 [2006-01-02 06:00 UTC] cellog
dup[e of #6145, which was just fixed. Use the new --packagingroot option in PEAR 1.4.6
 [2006-01-09 11:10 UTC] glen at delfi dot ee
still doesn't work. it apears to need system pear files to exist and being writable to current user: $ strace -eopen pear -d doc_dir=/docs -d php_dir=/usr/share/pear -d bin_dir=/usr/bin -d data_dir=/usr/share/pear/data -d test_dir=/usr/share/pear/tests install --packagingroot=/home/builder/rpm/pld/pear/BUILD/PEAR-1.4.6 --offline --nodeps /home/builder/rpm/pld/pear/SOURCES/PEAR-1.4.6.tgz [...] open("/usr/share/pear/.lock", O_RDONLY) = 3 open("/usr/share/pear/PEAR/ChannelFile.php", O_RDONLY) = 4 open("/usr/share/pear/PEAR/ErrorStack.php", O_RDONLY) = 4 open("/usr/share/pear/PEAR/XMLParser.php", O_RDONLY) = 4 open("/usr/share/pear/PEAR/Common.php", O_RDONLY) = 4 open("/usr/share/pear/.channels/pear.php.net.reg", O_RDONLY) = 4 open("/usr/share/pear/.channels/pear.php.net.reg", O_RDONLY) = 4 Cannot install, php_dir for channel "pear.php.net" is not writeable by the current user open("/home/builder/tmp/tmpq2n2dJ", O_RDONLY|O_NONBLOCK| O_DIRECTORY) = 3 expected: it should work files *only* under /home/builder/rpm/pld/pear/BUILD/PEAR-1.4.6 and *nowhere* outside that dir.