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

Request #10413 Relative paths in registry etc.
Submitted: 2007-03-19 10:43 UTC
From: yunosh Assigned: cweiske
Status: Closed Package: PEAR (version CVS)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2007-03-19 10:43 UTC] yunosh (Jan Schneider)
Description: ------------ This is a feature request for PEAR 2.0. The goal is to bundle a PEAR respository including installer out of the box. At the moment, if you bundle a set of PEAR packages with your application, it's complicated to allow updgrading of these packages without having to upgrade the whole application. If all paths in a repository were relative, this would be much easier, and would also allow to move a repository to a different path without any problems.

Comments

 [2007-06-02 20:58 UTC] cvogt (Ch Vogt)
Yes please!! Consider using %~dp0 in .bat files to replace the fixed directory path an dirname(__FILE__) in .php files. Why not before 2.0 ;)? Shouldn't be too much work an quite helpful. could be bound to an command line option.
 [2007-06-02 22:12 UTC] cvogt (Ch Vogt)
Hej, I created a update-pear-dir.bat file to update the pear installation to a new directory. To use it: * install package File_SearchReplace package * put update-pear-dir.bat in the same directory as pear.bat * replace c:\PEAR in update-pear-dir.bat with the folder where you initially installed pear * move pear * run the script each time you move pear (it replaces the path in all pear files and in itself). Note: Wenn you call it from another script make sure you set the cwd to the pear folder. update-pear-dir.bat (one line): php -r " $old_directory = 'c:\PEAR'; $dir = getcwd(); set_include_path($dir.DIRECTORY_SEPARATOR.'pear'); require('File'.DIRECTORY_SEPARATOR.'SearchReplace.php'); $snr = new File_SearchReplace(addslashes($old_directory), addslashes($dir), '*', $directories = '.'.DIRECTORY_SEPARATOR, $include_subdir = TRUE);$snr -> doSearch() ;$snr = new File_SearchReplace($old_directory, $dir, '*', $directories = '.'.DIRECTORY_SEPARATOR, $include_subdir = TRUE);$snr -> doSearch();"
 [2011-02-22 20:49 UTC] cweiske (Christian Weiske)
-Status: Open +Status: Closed -Assigned To: +Assigned To: cweiske
This is possible with pyrus, see http://pear2.php.net/PEAR2_Pyrus