Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to install extensions on specific magento versions. -Solved-
 
Matt Dean
Guru
 
Avatar
Total Posts:  549
Joined:  2008-05-27
 

I maintain a community extension on Magento Connect.

When I make updated versions of this extension I want to test against several versions of Magento before I release it, to make sure I don’t break backwards compatibility with earlier versions of the Magento core.

So, I’m trying to install a few versions of Magento locally. This I can do. Download the tarball for the version I want, extract, go through the web-based install process. Works nicely.

The problem I’m having is that whenever I try to install an extension from Magento Connect, it silently and sneakily decides to upgrade it’s core packages.  I’m a bit confused about why it thinks it’s a good idea to do this without asking me, and it’s pretty damn annoying.

For example, the following is with a fresh 1.1.8 install from the command line:

$ ./pear install -f magento-community/OrganicInternet_SimpleConfigurableProducts
WARNING
failed to download connect.magentocommerce.com/community/OrganicInternet_SimpleConfigurableProducts within preferred state "stable"will instead download version 0.3stability "beta"
Did not download optional dependenciespear/XML_RPC, use --alldeps to download automatically
pear
/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
downloading OrganicInternet_SimpleConfigurableProducts-0.3.tgz ...
Starting to download OrganicInternet_SimpleConfigurableProducts-0.3.tgz (11,585 bytes)
.....
done11,585 bytes
downloading Mage_Core_Modules
-1.2.0.3.tgz ...
Starting to download Mage_Core_Modules-1.2.0.3.tgz (1,434,139 bytes)
...
done1,434,139 bytes
downloading Lib_Varien
-1.2.0.tgz ...
Starting to download Lib_Varien-1.2.0.tgz (102,280 bytes)
...
done102,280 bytes
downloading Lib_Google_Checkout
-1.2.0.tgz ...
Starting to download Lib_Google_Checkout-1.2.0.tgz (27,164 bytes)
^
C

Mage core modules 1.2? Lib varien 1.2? I didn’t ask for those. (and my extension even states that it’s not compatible with v1.2 so they definitely should not be installed) [edit: OK in truth it doesn’t. I was pretty sure it did but it doesn’t. See further down the thread for more info.]

Now I’ll admit I’m a bit clueless where pear is concerned - it’s a bewildering piece of software which looks very much like it’s in need of some half decent docs and a dollop of polish, so maybe there’s some magic flag which will mean that when I ask it to just install one extension/package it does what I ask.

Anyone any idea?

Is there a way to tell pear to get a specific version of a package?

(Also, upon fresh install magento connect manager doesn’t list any installed packages. The only advice I’ve found for this problem is to install ‘magento-core/Mage_All_Latest’ which as well as making MCM work as it should do out of the box also installs the newest version of everything - exactly the opposite of what I want to do)

Yours frustratedly,
Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

What happens when you take off the force flag:

./pear install magento-community/OrganicInternet_SimpleConfigurableProducts-beta

...or:

./pear install magento-community/OrganicInternet_SimpleConfigurableProducts
 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Dean
Guru
 
Avatar
Total Posts:  549
Joined:  2008-05-27
 

Hi Mr Crucial,

Thanks for replying - however it just does the following:

/var/www/magento/118/magento$ ./pear install magento-community/OrganicInternet_SimpleConfigurableProducts-beta 
Did not download optional dependencies
pear/XML_RPC, use --alldeps to download automatically
pear
/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
downloading OrganicInternet_SimpleConfigurableProducts-0.3.tgz ...
Starting to download OrganicInternet_SimpleConfigurableProducts-0.3.tgz (11,585 bytes)
.....
done11,585 bytes
downloading Mage_Core_Modules
-1.2.0.3.tgz ...
Starting to download Mage_Core_Modules-1.2.0.3.tgz (1,434,139 bytes)
^
C

/var/www/magento/118/magento$ ./pear install magento-community/OrganicInternet_SimpleConfigurableProducts
Failed to download magento
-community/OrganicInternet_SimpleConfigurableProducts within preferred state "stable"latest release is version 0.3stability "beta", use "channel://connect.magentocommerce.com/community/OrganicInternet_SimpleConfigurableProducts-0.3" to install
Cannot initialize 
'channel://connect.magentocommerce.com/community/OrganicInternet_SimpleConfigurableProducts'invalid or missing package file
Package 
"channel://connect.magentocommerce.com/community/OrganicInternet_SimpleConfigurableProducts" is not valid
install failed

Naughty Magento!

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Dean
Guru
 
Avatar
Total Posts:  549
Joined:  2008-05-27
 

And now I’ve just tried a fresh 1.1.6 install - including a new DB etc. and see the same issue:
(this time I’ve been into Magento Connect Manager settings and set my preferred state to beta, so I don’t need the -f this time)

/var/www/magento/116/magento$ ./pear install magento-community/OrganicInternet_SimpleConfigurableProducts
Did not download optional dependencies
pear/XML_RPC, use --alldeps to download automatically
pear
/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
downloading OrganicInternet_SimpleConfigurableProducts-0.3.tgz ...
Starting to download OrganicInternet_SimpleConfigurableProducts-0.3.tgz (11,585 bytes)
.....
done11,585 bytes
downloading Mage_Core_Modules
-1.2.0.3.tgz ...
Starting to download Mage_Core_Modules-1.2.0.3.tgz (1,434,139 bytes)
^
C

No luck either.

So I suppose a better first question might be: How do I get Magento Connect Manager to work without installing Mage_All_Latest?

It’s funny, I’m sure I didn’t need to install Mage_All_Latest to get MCM working the first few times I installed Magento.(going back a while now)
I wonder what’s changed. Something at Varien’s server end?

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Dean
Guru
 
Avatar
Total Posts:  549
Joined:  2008-05-27
 

And even more oddly it even happens with a local file install…

/var/www/magento/116/magento$ ./pear install ../OrganicInternet_SimpleConfigurableProducts-0.3.tgz 
Did not download optional dependencies
pear/XML_RPC, use --alldeps to download automatically
pear
/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
downloading Mage_Core_Modules-1.2.0.3.tgz ...
Starting to download Mage_Core_Modules-1.2.0.3.tgz (1,434,139 bytes)
..................................................^
C

OK so about 2 mins later I found the pear param that I needed and it’s worked.
It’s “--nodeps” as you can see below.
You could argue that I was being a bit dense.

/var/www/magento/116/magento$ ./pear install --nodeps magento-community/OrganicInternet_SimpleConfigurableProducts
warning
magento-community/OrganicInternet_SimpleConfigurableProducts requires package "magento-core/Mage_Core_Modules" (version >= 1.1.6)
downloading OrganicInternet_SimpleConfigurableProducts-0.3.tgz ...
Starting to download OrganicInternet_SimpleConfigurableProducts-0.3.tgz (11,585 bytes)
.....
done11,585 bytes
install ok
channel://connect.magentocommerce.com/community/OrganicInternet_SimpleConfigurableProducts-0.3

Yes!

Now quite why Magento Core 1.2.0.3 is a dependency is interesting.

My extension specifies a min dependency of the Magento Core 1.1.6 which I already have installed, however it doesn’t specify a max or recommended.
Perhaps it should.

It seems that pear/Varien (not sure which, still a pear newbie) would prefer an automatic upgrade in this case.
Me, I’d prefer that _at most_ it asked me if I wanted an upgrade or not, as one isn’t actually needed.

Anyway, hopefully that saves someone from an unexpected upgrade of their (hopefully not live) site.

Matt

For my next trick I have to work out how to get MCM working without installing the Mage_All_Latest package....

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Dean
Guru
 
Avatar
Total Posts:  549
Joined:  2008-05-27
 

I’m posting too quickly tonight and not paying enough attention.

It’s just occurred to me why forced upgrade could be happening when it’s not actually required.
It seems that after a fresh install of Magento from a tarball PEAR doesn’t have a clue what’s actually installed.

Notice even when I was successful above I get the message:

warningmagento-community/OrganicInternet_SimpleConfigurableProducts requires package "magento-core/Mage_Core_Modules" (version >= 1.1.6)

I get this message from a fresh 1.1.6 install and from a fresh 1.1.8 install so clearly I’m already meeting that requirement.
But I get the warning because PEAR doesn’t know that I meet the requirements.

This would seem to be the cause of both my original problem and the lack of a functioning Magento Connect Manager after a fresh install.

It seems that we need a way of initialising PEAR’s knowledge of the currently installed packages.

Any PEAR expert out there care to suggest how this might be done?

Thanks,
Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattGWS
Jr. Member
 
Total Posts:  21
Joined:  2008-10-14
 

Did you have any luck with this in the end?

 
Magento Community Magento Community
Magento Community
Magento Community
 
LeeSaferite
Guru
 
Avatar
Total Posts:  322
Joined:  2007-08-31
Lake City, FL
 

Just remove the dependancy of Mage_Core_Modules and/or Mage_core_Adminhtml for the pear package you are creating.  Not the optimal solution, but it seems to work for me.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top