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

Bug #11733 run-scripts does not honor paths in specified config file
Submitted: 2007-08-01 13:52 UTC
From: bchavet Assigned:
Status: Bogus Package: PEAR (version 1.6.1)
PHP Version: 5.2.1 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 32 + 49 = ?

 
 [2007-08-01 13:52 UTC] bchavet (Ben Chavet)
Description: ------------ If a config file is specified on the command line (-c pear.conf), the run-scripts command does not honor the paths defined in that config file, and tries to load package files from the system default location. Test script: --------------- pear config-create ~/ ~/pear.conf pear -c ~/pear.conf channel-discover savant.pearified.com pear -c ~/pear.conf channel-discover pear.unl.edu pear -c ~/pear.conf install --alldeps -f unl/UNL_EventPublisher-alpha pear -c ~/pear.conf run-scripts unl/UNL_UCBCN Expected result: ---------------- "pear run-scripts" should run the script using the paths defined in ~/pear.conf Actual result: -------------- The paths in ~/pear.conf are ignored.

Comments

 [2007-08-18 22:43 UTC] cellog (Greg Beaver)
I can't reproduce your problem run-scripts does in fact use pear.conf, and I have used this fact many times when installing Chiara_PEAR_Server from pear.chiaraquartet.net. Please try installing Chiara_PEAR_Server and running the post-install script, and you should find that it works fine. There are other issues going on. Since I'm in Lincoln, perhaps I can pop over some time with Brett to debug these issues directly (assuming you're in Lincoln too)
 [2007-08-24 16:22 UTC] bchavet (Ben Chavet)
I guess I did forget to mention that there are no PEAR packages installed at the system default location (apart from PEAR itself). So, any dependencies installed for unl/UNL_EventPublisher-alpha cannot be found because it is looking for them in the default location instead of where pear.conf says they are (~/ in this case). Also, I don't know why I didn't post this in the first place, but here is the actual error message I get from the run-scripts for UNL_UCBCN: Including external post-installation script "/root/pear/php/UNL/UNL_UCBCN_setup.php" - any errors are in this script Warning: require_once(MDB2/Schema.php): failed to open stream: No such file or directory in UNL/UNL_UCBCN_setup.php on line 15 Warning: require_once(MDB2/Schema.php): failed to open stream: No such file or directory in /root/pear/php/UNL/UNL_UCBCN_setup.php on line 15 Fatal error: require_once(): Failed opening required 'MDB2/Schema.php' (include_path='/usr/share/php') in /root/pear/php/UNL/UNL_UCBCN_setup.php on line 15 "pear -c ~/pear.conf list" shows that MDB2/Schema is installed in ~/.
 [2007-08-24 20:32 UTC] cellog (Greg Beaver)
to quote you: in /root/pear/php/UNL/UNL_UCBCN_setup.php on line 15 "pear -c ~/pear.conf list" shows that MDB2/Schema is installed in ~/. Your include_path does not have ~/ in it, so PHP can't find the files.
 [2007-08-24 20:33 UTC] cellog (Greg Beaver)
(include_path='/usr/share/php') somehow missed this in the paste
 [2007-08-25 05:23 UTC] bchavet (Ben Chavet)
> Your include_path does not have ~/ in it, so PHP can't > find the files. That's exactly the problem. ~/pear.conf says that the pear packages are installed in ~/, so it would be nice if it would let PHP know about it so it could be added to the include_path on the fly.
 [2007-08-25 05:56 UTC] bchavet (Ben Chavet)
I attached a patch to PEAR/Config.php that works for my case. It simply adds the php_dir from a user defined config file to the end of the include_path. Ideally, it would add it as the first item in the path. It is explicitly defined as the location of the pear packages, so it should be searched first. But, PEAR.php has already been included from the default location, and including it again from the custom location makes PHP complain about functions being redefined.