Need help with PackageFileManager2, may be found bugs
| From: | Dmitri | Date: | Thu, 03 Jan 2008 15:43:46 +0000 |
| Subject: | Need help with PackageFileManager2, may be found bugs | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-28388@lists.php.net to get a copy of this message | ||
Hello again.
It this group always so inactive of just during the holidays?
There is a very little documentation on PackageFileManager2 and almost no good examples on how to create a pear package.
I really need help from someone who knows the pear installer well, preferrably from Greg Beaver, but I think he is very busy and has not replied to my emails.
Can someone else help me?
Here are a couple of questions, I am not sure if these are bugs or not:
I have this in makexml.php (the script that users Pear/PackageFileManager2.php)
I am using pear 1.7.0RC2
'dir_roles' => array(
'docs' => 'doc',
'sql' => 'data',
'tests' => 'test',
'fonts' => 'data',
'css' => 'www',
'templates' => 'www',
'img/work' => 'www',
'img' => 'www',
'js' => 'www',
'images' => 'www',
'dyn' => 'www',
'config' => 'www'
Most of the things are working the way I expect except that the img directory is not added to 'www' directory.
I don't have any files in the 'img' directory, only 4 empty sub-directories, but I still need these directories to be created in www path
Is this a bug that PackageFileManager2 does not add www role to empty directories?
Another question, again I am not sure if this is a bug or not:
I added this to array passed to setOptions:
'exceptions' => array(
'simpletest.php' => 'test',
'LICENSE.txt' => 'doc',
'index.php' => 'www',
'favicon.ico' => 'www',
'ajaxserver.php' => 'www',
'robots.txt' => 'cfg',
'image.php' => 'www',
),
See how I added a role 'cfg' to robots.txt
This was just to test if the new cfg role will work properly
in the created package.xml the line was created like this:
<file baseinstalldir="SHAREDLOG" md5sum="1cd05a835a63895cad28a0931d91a03f" name="robots.txt" role="cfg" />
looks good
The file robots.txt has been installed in is /usr/local/php/lib/php/cfg/SHAREDLOG/SHAREDLOG/robots.cfg
See how the package name has been added twice to the path?
The same thing happend to the www role files:
I created a www_dir with pear config-set www_dir /usr/local/apache/sites/sharedlog.com/htdocs
and all the www files have been installed in /usr/local/apache/sites/sharedlog.com/htdocs/SHAREDLOG/SHAREDLOG/
again, the package name 'SHAREDLOG' has been added to path twice
Is this a bug with the new file roles www and cfg?
Here is how I added package name:
$pfm->setPackage('SHAREDLOG');
$pfm->setChannel('pear.sharedlog.com'); // I created the channel server already using Chiara pear server (have not uploaded the package there yet, installing directly from .tgz file)
Please help me. I have other questions, like how to set directory permissions from post-install script.
Would be nice to have more examples of post-install scripts, especially with setting write permissions to specific directories.
--
Open Source ALL content management
with streaming video
http://wiki.sharedlog.com