Can someone have a look at this pull request I made?

It does two changes. I think they are both sane, but the first one could be tricky, so feedback would be good. This is the change:

Dependency profiles from metadata.xml that are already applied, are not applied again. Instead, its upgrade steps, if any, are applied. In code you can choose the old behavior of always applying the dependencies, by calling runAllImportStepsFromProfile with always_apply_profiles=True. Or you can choose to be happy with any applied version and ignore any upgrade steps, by using upgrade_dependencies=False. Note that these arguments cannot both be True.

Less tricky is the second change:

Be more forgiving when dealing with profile ids with or without profile- at the start. All functions that accept a profile id argument and only work when the id does not have this string at the start, will now strip it off if it is there. For example, getLastVersionForProfile will give the same answer whether you ask it for the version of profile id foo or profile-foo.

For more background info see the pull request. I added tests and all tests pass.


Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl

Zope-CMF maillist  -  Zope-CMF@zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to