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

Bug #15914 pear upgrade installs different version if desired version not found
Submitted: 2009-02-18 21:45 UTC
From: cweiske Assigned: dufuz
Status: Closed Package: PEAR
PHP Version: 5.2.8 OS:
Roadmaps: 1.8.0alpha1, 1.8.0RC1    
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 : 23 + 3 = ?

 
 [2009-02-18 21:45 UTC] cweiske (Christian Weiske)
Description: ------------ When trying to upgrade a non-existent version of a package, pear tries to install the latest known version. When not using -f, it crashes. Test script: --------------- cweiske:~/Dev/cvs/pear/pear-core> pear upgrade -f phpunit/phpunit-1.2.3somestrange4 WARNING: failed to download pear.phpunit.de/phpunit, version "1.2.3somestrange4", will instead download version 3.3.14, stability "stable" WARNING: channel "pear.phpunit.de" has updated its protocols, use "pear channel-update pear.phpunit.de" to update Did not download optional dependencies: pear/Image_GraphViz, pear/Log, use --alldeps to download automatically downloading PHPUnit-3.3.14.tgz ... Starting to download PHPUnit-3.3.14.tgz (271,938 bytes) .............................. Expected result: ---------------- Actual result: -------------- cweiske:~/Dev/cvs/pear/pear-core> pear upgrade phpunit/phpunit-1.2.3somestrange4 WARNING: channel "pear.phpunit.de" has updated its protocols, use "pear channel-update pear.phpunit.de" to update Did not download optional dependencies: pear/Log, use --alldeps to download automatically Fatal error: Call to a member function getArchiveFile() on a non-object in /home/cweiske/Dev/cvs/pear/instpear/share/pear/PEAR/Downloader.php on line 476 Call Stack: 0,0035 444104 1. {main}() /home/cweiske/Dev/cvs/pear/instpear/share/pear/pearcmd.php:0 0,2017 5517840 2. PEAR_Command_Common->run() /home/cweiske/Dev/cvs/pear/instpear/share/pear/pearcmd.php:312 0,2017 5517840 3. PEAR_Command_Install->doInstall() /home/cweiske/Dev/cvs/pear/instpear/share/pear/PEAR/Command/Common.php:275 0,3672 11328376 4. PEAR_Downloader->download() /home/cweiske/Dev/cvs/pear/instpear/share/pear/PEAR/Command/Install.php:671

Comments

 [2009-02-19 04:48 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Assigned To: +Assigned To: dufuz -Roadmap Versions: 1.8.0alpha2 +Roadmap Versions: 1.8.0alpha1, 1.8.0alpha2
 [2009-02-19 04:50 UTC] dufuz (Helgi Þormar Þorbjörnsson)
can't seem to reproduce it on my end at the moment, can someone else ? I will try to bolster the code around this before a release to at least not show a fatal error like that. Also Christian, you were trying to install with 3.4.0a4 today while Sebastian uses 3.4.0alpha4 :-)
 [2009-02-19 10:40 UTC] cweiske (Christian Weiske)
I know that I tried the /wrong/ version. That's the problem - see the description of the bug and the title.
 [2009-03-04 21:52 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Did you have phpunit/phpunit already installed when you attempted to do this or ? if so - which version of it ?
 [2009-03-07 23:51 UTC] cweiske (Christian Weiske)
Yes, I had phpunit installed previously and wanted to upgrade. Not sure of the old version, though - I think it was 3.3.15, the stable one. Or the previous alpha :)
 [2009-03-08 02:18 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Status: Assigned +Status: Closed
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. Fixed for me but please test it just in case - perhaps I didn't catch them all or the fix was not elegant enough.