Re: deprecating xml-rpc and package.xml 1.0
| From: | Laurent Laville | Date: | Mon, 23 Oct 2006 18:33:03 +0000 |
| Subject: | Re: deprecating xml-rpc and package.xml 1.0 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-44727@lists.php.net to get a copy of this message | ||
Lukas Kahwe Smith a écrit :
OK my current attempts are in MDB2 cvs as package2.php However I get the following error message: PEAR_PackageFileManager2 Error: Package validation failed: Error: Invalid tag order in <package>, found <summary> expected one of "channel, uri" Error: package.xml <package> tag has no version attribute, or version is not 2.0 This is probably related to the "problem" of having a v1 package.xml already. This is exactly the problem !You can't have a package2 generator script with a setOptions(), something like PEAR CVS P_PFM example named "makepackage.php" [1] if you have in your "packagedirectory" a package.xml (version 1.0), unless you give a new name different than default (package.xml) with the "packagefile" option directive. for Example : setOptions(array("packagefile" => "mypackage2.xml", ...)
This is where I am a bit confused about the philosophie. Since I have no intention on continueing a v1 file, I just want to migrate and from then on never bother with a v1 package.xml again. You can easily migrate your package xml 1.0 by running command :$ pear convert [mdb2_directory]\package.xml [mdb2_directory]\package2.xml or $ pear convert [mdb2_directory]\package.xml [another_directory]\package.xml then move [another_directory]\package.xml into [mdb2_directory] to replace your old package xml 1.0 by a fresh new package xml 2.0 with all details imported. Second possibility is to use the "basicConvert.php" example [1]
If I understand correctly this will not work. What I have to do is do once migrate the original file with one script and then rewrite another script that will then work for me in the future? Once you'll have migrate your package xml 1.0 to a package xml 2.0 , you'll need only one script (like "updatepackage.php" [1]) to manage your new releases.To resume : - a package2 script generator with setOptions() method usage is only to build your package xml 2.0 for first time - a package2 script generator with importOptions() method usage is for manage your package xml 2.0 , second time and more
regards, Lukas Hope it will help to understand the P_PFM philosophieTo all users: a TIP Add in your package2 script a line like this to improve error detection, and found message like the one at top of this mail PEAR::setErrorHandling(PEAR_ERROR_DIE); Almost all P_PFM methods are supposed to return a PEAR_Error. regards Laurent [1] http://cvs.php.net/viewvc.cgi/pear/PEAR_PackageFileManager/examples/