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

From: Date: Wed, 23 Jul 2003 21:04:50 +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-18601@lists.php.net to get a copy of this message
Greg i've tried your solution but it won't work $options = array( 'package' => 'HTML_Progress', 'summary' => $summary, 'description' => $description, 'baseinstalldir' => 'HTML', 'version' => '0.4', 'packagedirectory' => 'd:/pearworld/sources/HTML_Progress', 'dir_roles' => array('apidoc' => 'doc', 'docs' => 'doc', 'examples' => 'doc'), 'state' => 'stable', 'filelistgenerator' => 'file', 'notes' => 'First PEAR package release of HTML_Progress', 'ignore' => array('package.xml', 'Thumbs.db', 'show.php', 'd:/pearworld/sources/HTML_Progress/index.html' ) and the package.xml generated give me again : <filelist> <file role="doc" baseinstalldir="HTML" name="apidoc/classtrees_HTML_Progress.html"/> <file role="doc" baseinstalldir="HTML" name="apidoc/elementindex.html"/> <file role="doc" baseinstalldir="HTML" name="apidoc/elementindex_HTML_Progress.html"/> <file role="doc" baseinstalldir="HTML" name="apidoc/errors.html"/> <file role="doc" baseinstalldir="HTML" name="apidoc/index.html"/> <file role="doc" baseinstalldir="HTML" name="apidoc/li_HTML_Progress.html"/> <file role="doc" baseinstalldir="HTML" name="apidoc/HTML_Progress/HTML_Progress.html"/> <file role="doc" baseinstalldir="HTML" name="apidoc/HTML_Progress/_Progress_Progress_php.html"/> <file role="doc" baseinstalldir="HTML" name="apidoc/media/background.pn"/> <file role="doc" baseinstalldir="HTML" name="apidoc/media/empty.png"/> <file role="doc" baseinstalldir="HTML" name="apidoc/media/logo.png"/> <file role="doc" baseinstalldir="HTML" name="apidoc/media/style.css"/> <file role="doc" baseinstalldir="HTML" name="docs/index.html"/> <file role="doc" baseinstalldir="HTML" name="docs/pear-power.png"/> <file role="doc" baseinstalldir="HTML" name="docs/progress1.png"/> <file role="doc" baseinstalldir="HTML" name="docs/progress2.png"/> <file role="doc" baseinstalldir="HTML" name="docs/progress3.png"/> <file role="doc" baseinstalldir="HTML" name="docs/progress4.png"/> <file role="doc" baseinstalldir="HTML" name="docs/progress5.png"/> <file role="doc" baseinstalldir="HTML" name="docs/progress6.png"/> <file role="doc" baseinstalldir="HTML" name="examples/cross.png"/> <file role="doc" baseinstalldir="HTML" name="examples/installing.html"/> <file role="doc" baseinstalldir="HTML" name="examples/progress.js"/> <file role="doc" baseinstalldir="HTML" name="examples/progress1.php"/> <file role="doc" baseinstalldir="HTML" name="examples/progress2.php"/> <file role="doc" baseinstalldir="HTML" name="examples/progress3.php"/> <file role="doc" baseinstalldir="HTML" name="examples/progress4.php"/> <file role="doc" baseinstalldir="HTML" name="examples/progress5.php"/> <file role="doc" baseinstalldir="HTML" name="examples/progress6.php"/> <file role="doc" baseinstalldir="HTML" name="examples/styles.css"/> <file role="doc" baseinstalldir="HTML" name="examples/wizard.png"/> <file role="doc" baseinstalldir="HTML" name="index.html"/> <file role="php" baseinstalldir="HTML" name="Progress.php"/> </filelist> What should i do ? Laurent "Greg Beaver" <greg@chiaraquartet.net> a écrit dans le message de news: 3F1EF0DB.2070503@chiaraquartet.net... > 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 (#18601) next »