Re: answer to Laurent's question and PEAR_PackageFileManager extension question to all

From: Date: Wed, 23 Jul 2003 20:39:21 +0000
Subject: Re: answer to Laurent's question and PEAR_PackageFileManager extension question to all
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18599@lists.php.net to get a copy of this message
I think making a seperate PEAR_PackageManager package would be good, nothing wrong with a small dependency tree :-). I am a little concerned about all these names though since their what you would expect for user package management program. For example there is: rpm redhat package manager, so if im a user who is looking for the way to install packages and their depencies i might try install this and get confused. Of course this shouldn't be a big problem since everyone should see the PEAR util right of the bat anyway, so you can probally just ignore this part of the email -joshua eichorn -- phpDocumentor http://phpdoc.org Greg Beaver wrote:
Hi Laurent, This can be fixed easily by supplying the full path to the index.html that you wish to ignore. the ignore option does a regex check against the entire path as well as against the filename, and if you put path delimiters in the ignore statement, it will only check against the path. In other words, change your ignore statement to:
'ignore'            => array('package.xml', 'Thumbs.db', '/path/to/index.htm', 'show.php')
and it will only match exactly 1 file. As for package generation option, I think that the fact you can do this in 3 lines of code:
    $pkgfile = $options['packagedirectory'].'/package.xml';
    $pkgbin = new PEAR_Packager();
    $e = $pkgbin->package($pkgfile);
means that perhaps it should remain separate from the package file manager, as that would make it into a package file manager/package tarballer, blurring the distinction. However, I do not object to adding in an extended class, perhaps PEAR_PackageManager or something, that adds this functionality and maybe a few other things. I'm not sure if it should be a sub-package of PEAR_PackageFileManager, or a new package that depends on PEAR_PackageFileManager, are there any opinions out there? Greg Laurent Laville wrote:
Hello Greg, As i've already told you, i wanted to finish my own packages docs before have a new look on PEAR_PackageFileManager. Well, it was some counting delay with found of a new bug. Now i'll explain : I've a package to prepare and my sources are as follow \HTML_Progress
    index.html   <--- i should have renamed it to  index.htm  (explain
below)
    \apidoc       where are my package API documentation generated by
phpDocumentor 1.2.1 (marvellous tools)
                       and as you already know it there is a file  named
index.html in this dir
    \docs          my quick tutorial to use my package;  it's also an
index.html file
    \examples   usage example of my package
Then, with keeping the index.html file on root of \HTML_Progress and using this script of generation (see source file => http://farell.free.fr/en/pear/temp/show.php?HTML_Progress.php ) I have ALL INDEX.HTML files ignored; - the one in \HTML_Progress of course ( wanted ) - the one in \apidoc - the one in \docs I regret to have loose this 2 previous, so i decided to rename the first at root of \HTML_Progress into index.htm and all works fine. CAUSE: ignore option run recursively and in my case it's not what i want; i want to ignore only the first file on root After that i got a perfect package.xml : see source http://farell.free.fr/en/pear/temp/show.php?package.xml If i've missed something in " ignore " option , please tell me ! NOW, for the idea : Why not include in PEAR_PackageFileManager the tarball generation part as i did it in http://farell.free.fr/en/pear/temp/show.php?HTML_Progress.php (end of script) That's all for now Thanks again a lot for this very useful tools Laurent


« previous php.pear.dev (#18599) next »