Re: package.xml in custom location
| From: | Tony Bibbs | Date: | Mon, 19 Mar 2007 16:00:19 +0000 |
| Subject: | Re: package.xml in custom location | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-45937@lists.php.net to get a copy of this message | ||
Worth noting I just tried to add a chdir() call to my .php script that runs all my "pear package" calls and that doesn't do the trick either.
Seems to me if you can successfully build the .xml to a custom output directory it should be able to build itself using the path information from the package xml. Instead it is using dirname() of the package.xml instead:
Validator.php:1635
if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $package)) {
$this->_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $package);
$this->_isValid = 0;
continue;
}
where $dir_prefix is:
$dir_prefix = dirname($this->_pf->_packageFile);
Should it not be possible to run "pear package" on a package xml file in a location outside of the root of the package? I mean I explicitly set 'packagedirectory' in my setOptions() call. If that can be agreed upon, I have no problem submitting a patch to do just that.
Or is it not that simple?
--Tony
Tony Bibbs wrote:
My project has a /path/to/app/build directory where I have all my package*.xml files in it. I have a script in that same directory that runs the "pear package" command on each .xml it finds. Problem is the .xml scripts seem to expect that the "pear package" be issued from the /path/to/app directory as I get a bunch of these sorts of errors: Error: File ".\plugins/calendar/config.php" in package.xml does not exist The error makes sense as the /plugins directory is not in /path/to/app/build, it's in /path/to/app. Is there a way around this? I like keeping all my PEAR build stuff in the /build directory if possible. --Tony