FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=15914&edit=1

ID: 15914
Updated by: helgith@gmail.com
Reported By: cweiske at php dot net
Summary: pear upgrade installs different version if desired
version not found
Status: Open
Type: Bug
Package: PEAR
PHP Version: 5.2.8
-Assigned To:
+Assigned To: dufuz
-Roadmap Versions: 1.8.0alpha2
+Roadmap Versions: 1.8.0alpha1, 1.8.0alpha2
New Comment:

<div id="changeset">
<span class="removed">-Assigned To:</span>
<span class="added">+Assigned To: dufuz</span>
<span class="removed">-Roadmap Versions: 1.8.0alpha2</span>
<span class="added">+Roadmap Versions: 1.8.0alpha1, 1.8.0alpha2</span>
</div>



Previous Comments:
------------------------------------------------------------------------

[2009-02-18 16:45:22] cweiske

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

------------------------------------------------------------------------

Search Discussions

  • Helgith at Feb 18, 2009 at 11:50 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=15914&edit=1

    ID: 15914
    Updated by: helgith@gmail.com
    Reported By: cweiske at php dot net
    Summary: pear upgrade installs different version if desired
    version not found
    Status: Assigned
    Type: Bug
    Package: PEAR
    PHP Version: 5.2.8
    Assigned To: dufuz
    Roadmap Versions:
    New Comment:

    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 :-)


    Previous Comments:
    ------------------------------------------------------------------------

    [2009-02-18 23:48:11] dufuz

    <div id="changeset">
    <span class="removed">-Assigned To:</span>
    <span class="added">+Assigned To: dufuz</span>
    <span class="removed">-Roadmap Versions: 1.8.0alpha2</span>
    <span class="added">+Roadmap Versions: 1.8.0alpha1, 1.8.0alpha2</span>
    </div>

    ------------------------------------------------------------------------

    [2009-02-18 16:45:22] cweiske

    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

    ------------------------------------------------------------------------
  • Cweiske at Feb 19, 2009 at 5:40 am
    Edit report at http://pear.php.net/bugs/bug.php?id=15914&edit=1

    ID: 15914
    Updated by: cweiske@php.net
    Reported By: cweiske at php dot net
    Summary: pear upgrade installs different version if desired
    version not found
    Status: Assigned
    Type: Bug
    Package: PEAR
    PHP Version: 5.2.8
    Assigned To: dufuz
    Roadmap Versions:
    New Comment:

    I know that I tried the /wrong/ version. That's the problem - see the
    description of the bug and the title.


    Previous Comments:
    ------------------------------------------------------------------------

    [2009-02-18 23:50:05] dufuz

    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-18 23:48:11] dufuz

    <div id="changeset">
    <span class="removed">-Assigned To:</span>
    <span class="added">+Assigned To: dufuz</span>
    <span class="removed">-Roadmap Versions: 1.8.0alpha2</span>
    <span class="added">+Roadmap Versions: 1.8.0alpha1, 1.8.0alpha2</span>
    </div>

    ------------------------------------------------------------------------

    [2009-02-18 16:45:22] cweiske

    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

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedFeb 18, '09 at 11:48p
activeFeb 19, '09 at 5:40a
posts3
users2
websitepear.php.net

2 users in discussion

Helgith: 2 posts Cweiske: 1 post

People

Translate

site design / logo © 2022 Grokbase