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

Bug #248 --force command does not work as expected
Submitted: 2003-11-14 12:07 UTC
From: smith at backendmedia dot com Assigned: cellog
Status: Closed Package: PEAR
PHP Version: 4.3.3 OS: Windows
Roadmaps: (Not assigned)    
Subscription  


 [2003-11-14 12:07 UTC] smith at backendmedia dot com
Description: ------------ The --force command does not work as expected. C:\php>pear install --force LiveUser No release with state equal to: 'stable' found for 'LiveUser' I would expect --force to install LiveUser eventhough my preferred state is "stable"

Comments

 [2003-11-17 05:55 UTC] cellog
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. here's the patch: Index: pear/PEAR/Installer.php =================================================================== RCS file: /repository/php-src/pear/PEAR/Installer.php,v retrieving revision 1.142 diff -u -r1.142 Installer.php --- pear/PEAR/Installer.php 17 Nov 2003 05:45:48 -0000 1.142 +++ pear/PEAR/Installer.php 17 Nov 2003 05:55:53 -0000 @@ -800,9 +800,12 @@ $version = $ver; } } - if ($version == 0) { + if ($version == 0 && !isset($options['force'])) { return $this->raiseError('No release with state equal to: \'' . implode(', ', $states) . "' found for '$pkgfile'"); + } else { + $this->log(0, "Warning: $pkgfile is state '$inf[state]' which is less stable " . + "than state '$state'"); } } // Check if we haven't already the version