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

Bug #6537 wrong export compatible v1 dependencies list with exclude limit
Submitted: 2006-01-20 10:49 UTC
From: farell Assigned: cellog
Status: Closed Package: PEAR
PHP Version: Irrelevant OS:
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 : 31 - 14 = ?

 
 [2006-01-20 10:49 UTC] farell
Description: ------------ While i play with PEAR_PackageFileManager2 class and export a compatible v1, i've noticed wrong dependencies list in package v1.0 in two cases: When you want to exclude the max version, in v2 it should give something like : <required> | <optional> <package> <name>HTML_QuickForm</name> <channel>pear.php.net</channel> <max>3.2.5</max> <exclude>3.2.5</exclude> </package> </required> | </optional> And when you want to exclude the min version, in v2 it should give something like : <required> | <optional> <package> <name>HTML_QuickForm</name> <channel>pear.php.net</channel> <min>3.2.4</max> <exclude>3.2.4</exclude> </package> </required> | </optional> and in v1, we should get something like : <dep type="pkg" rel="lt" version="3.2.5" optional="no">HTML_QuickForm</dep> <dep type="pkg" rel="gt" version="3.2.4" optional="no">HTML_QuickForm</dep> NOTICE the relation operator But we have actually, in such situation a 'ge' an 'le' relation operator. This is due to incomplete code on PEAR\PackageFile\v2.php tested with PEAR 1.4.6 I suggest to add , near lines 1673 and above, something like: } elseif (isset($dep['min'])) { if (isset($dep['exclude']) && $dep['exclude'] == $dep['min']) { $s['rel'] = 'gt'; } else { $s['rel'] = 'ge'; } $s['version'] = $dep['min']; $s['optional'] = $optional; if ($dtype != 'php') { $s['name'] = $dep['name']; } } elseif (isset($dep['max'])) { if (isset($dep['exclude']) && $dep['exclude'] == $dep['max']) { $s['rel'] = 'lt'; } else { $s['rel'] = 'le'; } $s['version'] = $dep['max']; $s['optional'] = $optional; if ($dtype != 'php') { $s['name'] = $dep['name']; } } Laurent Expected result: ---------------- in a package.xml v1.0: <deps> <dep type="pkg" rel="gt" version="3.2.5" optional="no">HTML_QuickForm</dep> </deps> and <deps> <dep type="pkg" rel="lt" version="3.2.5" optional="no">HTML_QuickForm</dep> </deps> Actual result: -------------- in a package.xml v1.0: <deps> <dep type="pkg" rel="ge" version="3.2.5" optional="no">HTML_QuickForm</dep> </deps> and <deps> <dep type="pkg" rel="le" version="3.2.5" optional="no">HTML_QuickForm</dep> </deps>

Comments

 [2006-01-23 17:50 UTC] cellog
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.