Re: Need help with PackageFileManager2, may be found bugs

From: Date: Thu, 03 Jan 2008 16:54:17 +0000
Subject: Re: Need help with PackageFileManager2, may be found bugs
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28391@lists.php.net to get a copy of this message
On Jan 3, 2008 10:25 AM, Sascha Grossenbacher <saschagros@bluewin.ch> wrote: > Hello > > On Thu, 03 Jan 2008 10:43:46 -0500, Dmitri <email12@sharedlog.com> wrote: > > 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? > > AFAIK, only files have roles, the directory is installed according to the > files in this folder (multiple times, if there are files with different > roles, I think). Create a feature request or add a dummy file inside this > folders. > Yes, use a dummy file. > > > > > 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? > > No, this is not a bug, this is configured this way. The first SHAREDLOG > comes from the <unusualbaseinstall> tag [1], which is part of the > configuration of a role, the other comes from the > baseinstalldir-configuration of your package. > > The question is, *why* is unusualbaseinstall set to 1, I don't think this > does make sense, I had the same problem a few minutes ago. Whith this > configuration, it is not possible to install a package into a given > toplevel htdocs directory. > > > > > 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. > > Well I have just used http://php.net/chmod for that, which > works fine. > > > > > Would be nice to have more examples of post-install scripts, especially > > with setting write permissions to specific directories. > > > > You could try out Greg's Book, as already mentioned. > Also look at Laurent Laville's guide for more documentation --- http://www.laurent-laville.org/pear/PEAR_PackageFileManager/docs/TDG/en/index.html In the past, I've used a search engine to find existing examples PFM usage by simply searching for 'new class_name' or use a code search... http://www.google.com/codesearch?q=pear_packagefilemanager2&hl=en&btnG=Search+Code http://www.google.com/search?q=new+pear_packagefilemanager2 -- -Brett Bieber http:saltybeagle.com aim:ianswerq

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