Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.7.2

Bug #6434 files list validation error with simpleouput = false on PFM160a4
Submitted: 2006-01-07 11:15 UTC
From: farell Assigned: farell
Status: Closed Package: PEAR_PackageFileManager
PHP Version: 4.4.1 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 40 + 19 = ?

 
 [2006-01-07 11:15 UTC] farell
Description: ------------ With PEAR_PackageFileManager2 1.6.0a4 When we want to use the 'outputdirectory' option to save a copy of new package.xml without replacing existing (into 'packagedirectory'), we got files list validation errors. See output messages. This error appear only when 'simpleoutput' is set to false. Reason came from PFM2::writePackageFile() method on line 964 which identify the package file. This identification will be use later in PEAR/PackageFile/v2/Validator.php on _analyzePhpFiles() method at line 1648. Note: _analyzePhpFiles() method is called only on line 265 when at least we have $state = PEAR_VALIDATE_PACKAGING <==> simpleoutput = false. But here (line 1648 at _analyzePhpFiles) the $dir_prefix variable identify the 'outputdirectory' target where none files exists. Hope my explains are enough clear Laurent Test script: --------------- <?php require_once 'PEAR/PackageFileManager2.php'; PEAR::setErrorHandling(PEAR_ERROR_DIE); // Package name and license used $package = 'HTML_QuickForm_advmultiselect'; // Full description of the package $description = <<<EOT The HTML_QuickForm_advmultiselect package adds an element to the HTML_QuickForm package that is two select boxes next to each other emulating a multi-select. EOT; // Summary of description of the package $summary = 'Element for HTML_QuickForm that emulate a multi-select.'; // Configuration of PEAR::PackageFileManager2 $options = array( 'packagefile' => 'package.xml', 'packagedirectory' => './pkg', 'outputdirectory' => 'e:\wamp\tmp', 'filelistgenerator' => 'file', 'baseinstalldir' => 'HTML/QuickForm', 'changelogoldtonew' => false, 'simpleoutput' => false ); $pkg = new PEAR_PackageFileManager2(); $pkg->setOptions($options); // general infos $pkg->setPackage($package); $pkg->setPackageType('php'); $pkg->setChannel('pear.php.net'); $pkg->setPearinstallerDep('1.4.3'); $pkg->setSummary($summary); $pkg->setDescription($description); $pkg->setLicense('PHP License 3.0', 'http://www.php.net/license/3_0.txt'); // release infos $pkg->addRelease(); $pkg->setAPIVersion('1.0.0'); $pkg->setAPIStability('devel'); $pkg->setReleaseVersion('0.1.0'); $pkg->setReleaseStability('alpha'); $pkg->setNotes('pfm2 bugs'); $pkg->setPhpDep('4.2.0'); $pkg->addMaintainer('lead', 'farell', 'Laurent', 'farell@php.net'); $pkg->generateContents(); $pkg->debugPackageFile(); print 'still alive'; ?> Expected result: ---------------- a preview of xml package Actual result: -------------- PEAR_PackageFileManager2 Error: Package validation failed: error: File "e:/wamp/tmp\example_default.php" in package.xml does not exist error: File "e:/wamp/tmp\b_usradd.png" in package.xml does not exist error: File "e:/wamp/tmp\b_tipp.png" in package.xml does not exist error: File "e:/wamp/tmp\b_save.png" in package.xml does not exist error: File "e:/wamp/tmp\b_edit.png" in package.xml does not exist error: File "e:/wamp/tmp\b_drop.png" in package.xml does not exist error: File "e:/wamp/tmp\docs/package.txt" in package.xml does not exist

Comments

 [2006-01-09 10:22 UTC] farell
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. PackageFileManager2.php,v 1.23 $outputdir on line 968-969 must not be remove, because it will use it later (line 1001 and below) to create package file in true directory. Laurent