Re: package.xml v2.0 questions

From: Date: Thu, 16 Nov 2006 20:08:12 +0000
Subject: Re: package.xml v2.0 questions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-44951@lists.php.net to get a copy of this message
Terra Frost wrote: > The package.xml example given at > > <http://pear.php.net/manual/en/guide.developers.package2.php> > uses the > following for its file tag: > > <file name="Dependency2.php" role="php"> > <tasks:replace from="@PEAR-VER@" to="version" > type="package-info"/> > </file> > > In contrast, PEAR 1.4.11 > <http://pear.php.net/package/PEAR> uses this: > > <file md5sum="b309a1eb31b2826cd1cec229fb352eb0" name="OS/Guess.php" > role="php"> > <tasks:replace from="@package_version@" to="version" > type="package-info" /> > </file> > > Which one is correct? Is the md5sum attribute needed or not? Both are correct. The md5sum is automatically generated and added when you run "pear package" - take a look at http://cvs.php.net/pear-core/package2.xml, and you'll see that the OS/Guess.php file is in fact: <dir name="OS"> <file name="Guess.php"> <tasks:replace from="@package_version@" to="version" type="package-info" /> </file> </dir> It is transformed to the one above on packaging. > Also, the first example seems to specify subdirs via nested dir tags - > not by having their path in the name attribute as the second one does. > eg. The first one would seem to suggest that this is the way to do it: > > <dir name="/"> > <dir name="OS"> > <file name="Guess.php" ...> > ... > </file> > </dir> > </dir> > > ...whereas the latter would seem to suggest this: > > <dir name="/"> > <file name="OS/Guess.php" ...> > ... > </file> > </dir> Again, both are acceptable. PEAR is very flexible about how the file list is arranged. > Also, I note that PEAR includes both v1 and v2 of package.xml (albeit > with different names). Any ideas as to why? PEAR version 1.3.5 and older doesn't know anything about package.xml v2, and if we didn't include package.xml v1, it would be impossible to upgrade from 1.3.x to the latest version. At this point, PEAR is the only package that still needs to have this option, as PEAR 1.4.0+ adoption rate is greater than 99% Greg

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