Re: pear convert

From: Date: Sun, 26 Sep 2004 18:14:21 +0000
Subject: Re: pear convert
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33554@lists.php.net to get a copy of this message
Daniel Convissor wrote:
On Sun, Sep 26, 2004 at 01:43:14AM -0400, Greg Beaver wrote:
Note that because of the way PEAR needs filelists (flattened into a single set of file tags), when it regurgitates a recursive filelist, baseinstalldir will be repeated for every file. To fix this, you have to manually modify the file after it is created.
I don't understand what you're saying. Can you state your point in another way, please?
<filelist> <dir name="grnok" baseinstalldir="foo"> <file name="blah.php" role="php"/> <file name="bar.php" role="php/> </dir> </filelist> becomes array( 'grnok/blah.php' => array('role' => 'php', 'baseinstalldir' => 'foo'), 'grnok/bar.php' => array('role' => 'php', 'baseinstalldir' => 'foo'), ) and when regenerated, the filelist is flattened (no directories) <filelist> <file name="grnok/blah.php" role="php" baseinstalldir="foo"/> <file name="grnok/bar.php" role="php" baseinstalldir="foo"/> </filelist> when the new package2.xml is generated, it can do a flattened filelist like the above, but most people prefer a hierarchical directory structure, so it can generate instead: <contents> <dir name="grnok"> <file name="blah.php" role="php" baseinstalldir="foo"/> <file name="bar.php" role="php" baseinstalldir="foo"/> </dir> </contents> With quite a bit more code and work, I could preserve the information from the original package.xml, but it hardly seems worth the effort when PEAR_PackageFileManager is designed to make this more customizable. Greg

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