Hi

I am no wizard on this, but I think this should work if you are not upgrading 
the other product, just installing it.

1) Make an upgrade step in your product (xcml)
2) Make a new profile in your product (in other words a folder "upgrade_1_to_2" 
with metadata.xml in it

If the other product also has an upgrade profile, and this is "doable with just 
xml files (in other words, no python code involved in the upgrade), it should 
also be possible to have
 
>   <dependencies>
>     <dependency>profile-some_propduct:some_upgrade_profile</dependency>
>   </dependencies>


__________________
Maybe you also could try (untested)

  <gs:upgradeStep
    title="Upgrade my cool product"
    description="Upgrade my product and install another product described in 
/profiles/ugrade_1_to_2/metadata.xml"
    source="1"
    destination="2"
    handler=".upgrades.upgrade_1_to_2"
    profile="my.product:upgrade_1_to_2"/>

And something in .upgrades.py of you product, maybe 

def upgrade_1_to_2(context):
    """Upgrade something"""
    setup = getToolByName(context, 'portal_setup')
    setup.runAllImportStepsFromProfile('profile-some.product:someprofile')



Espen

23. apr. 2013 kl. 13:24 skrev Jochen Dekeyser [via Plone] 
<[email protected]>:

> I want to clearify my question, I don't think my previous question is 
> completly clear: 
> Suppose I have an add-on with metadata.xml 
> 
> <?xml version="1.0"?> 
> <metadata>
>   <version>1</version>
> </metadata>
> 
> Now I want to upgrade my add-on and metadata.xml to: 
> 
> <?xml version="1.0"?> 
> <metadata>
>   <version>2</version>
>   <dependencies>
>     <dependency>profile-mydependency:default</dependency>
>   </dependencies>
> </metadata>
> 
> And I want to create an upgrade step which automatically installs 
> profile-mydependency:default when I upgrade from version 1 to version 2... 
> 
> What is the best practice to do this? 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://plone.293351.n2.nabble.com/Best-practice-to-install-additional-dependency-profile-in-upgradestep-tp7564667p7564674.html
> To start a new topic under Product Developers, email 
> [email protected] 
> To unsubscribe from Plone, click here.
> NAML





--
View this message in context: 
http://plone.293351.n2.nabble.com/Best-practice-to-install-additional-dependency-profile-in-upgradestep-tp7564667p7564679.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to