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

Bug #13310 Package file validation errors
Submitted: 2008-03-05 08:58 UTC
From: shangxiao Assigned: dufuz
Status: Assigned Package: PEAR_PackageFileManager2
PHP Version: 5.2.2 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2008-03-05 08:58 UTC] shangxiao (David Sanders)
Description: ------------ When I run "pfm" (PEAR_PackageFileManager_Cli) on it's own package file, I get validation errors and exit failure from PEAR_PackageFileManager2. However if I package everything up and install, it installs fine. There are 2 validation errors: 1. An error stating that there should only be one <install> tag per file. This should not be flagged as the install tags are in separate <phprelease> tags. 2. It states that scripts/pfm.bat does not exist, which is not true. Test script: --------------- 1. Checkout PEAR_PackageFileManager_Cli 2. Install pfm 3. Run pfm in it's own directory 4. Choose option 14: Save & quit Expected result: ---------------- Exit success Actual result: -------------- ... 14. Save & Quit 15. Quit without saving (ctrl-c) Please choose an option from the menu: 14 PEAR_PackageFileManager2 Error: Package validation failed: Error: Only one <install> tag is allowed for file "scripts/pfm" Error: <install name="scripts/pfm.bat"> is invalid, file is not in <contents>

Comments

 [2008-07-24 06:03 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Looking at your own code and the package.php I constructed for your package I kinda have to think that your code is at fault. I need to do more testing before I'm 100% but generateContents in the pfm script is doing fun things with scripts - the fact that you have 2x name="scripts/pfm" going on in your code and given that function in your scripts is adding them by that name into addInstallAs() might be causing the conflict. Could it not be very much possible it's trying to add the same name 2x into the same phprelease ? As in your code lacks the knowledge of multiple phpreleases with conditions and what not. Could you also look into the matter since you are more familiar with your own code.
 [2011-03-24 05:10 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Package: PEAR_PackageFileManager +Package: PEAR_PackageFileManager2
 [2011-03-27 07:12 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Roadmap Versions: 1.7.0 +Roadmap Versions:
I had a brief look at the source of your CLI tool and played around with it a bit, I can safely say (after having commented out the code portion) that the if statement starting on line 814 is the cause of your problem, without it I get no errors. I also constructed a simple test case and it runs through just fine. At a quick glance I can not figure out what that snippet is trying to do, is that something you can explain? Why is this required for scripts specifically?
 [2011-03-28 07:55 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Assigned To: +Assigned To: dufuz