Re: Need help with PackageFileManager2, may be found bugs

From: Date: Thu, 03 Jan 2008 16:00:36 +0000
Subject: Re: Need help with PackageFileManager2, may be found bugs
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28389@lists.php.net to get a copy of this message
On Jan 3, 2008 9:43 AM, Dmitri <email12@sharedlog.com> wrote: > 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. > Hi Dmitri, You might be right about the holidays causing the inactivity :) I don't have any real experience using PFM2, other than making small changes in PhpDocumentor's *create_package.xml.php* script file that regenerates its *package.xml* file. It's possible that you might see something useful in there. Just a hunch about the doubled directory names... I'm guessing the top-level one is being created by the *setPackage()* method, while the second-level one is being created by the *baseinstalldir* attribute. You might try setting *baseinstalldir* to just "/" and see if that gives you the results you want. One other resource you might try is the case study in Chapter 3 of Greg's *PEAR Installer* book... there's a PDF version available so that you can get it "immediately". -- CRB

« previous php.pear.general (#28389) next »