I wonder what the best way is of specifying the source number of a
GenericSetup upgrade step.
Case in point: Products.Poi, an issue tracker for CMFPlone. Between
version 1.1 and 1.2 there were changes that needed an upgrade step,
which I registered like this:
description="Fix description of issues."
Works fine: the upgrade step is shown in the Upgrades tab of
portal_setup when migrating from Poi 1.1 to 1.2.
Problem is, the 1.1 version of Poi got a few minor releases. So
someone could be upgrading from Poi 1.1.2 to 1.2. And then the
upgrade steps do *not* get shown. Reason: 1.1.2 is larger than 1.1 so
portal_setup assumes the upgrade step has been run already. Asking
portal_setup to show old upgrades does still work as expected of
I solved this by changing the registration of the upgrade step: it is
now defined as being an upgrade from source="1.1.9". That version
does not (yet) exist. The assumption is that this source will always
be higher than any possible future release from the 1.1 branch.
Even when restricting yourself to simple increasing integers in a
metadata.xml instead of a dotted number, the problem is the same. Say
the 1.1 branch is at profile revision 1100 now. If I then set the
profile revision of trunk to 1101 I deny the 1.1 branch any future
profile revision changes. So I would give trunk profile revision
1200, allowing the 1.1 branch room for 99 profile revision updates.
Probably not relevant here, but for completeness sake:
- Poi branch 1.1 has 1.1.x in its version.txt and does not have a
- Poi trunk has 1.2.x in both its version.txt and metadata.xml.
I know that it is best to use both files (or a version in setup.py
instead of version.txt) and that both versions need not be the same at
all. But this is the current situation.
So my question is: is this a sane way of doing this? Is it alright to
specify a version (or really a profile revision) as source when that
version does not yet exist? It works fine as far as I can tell.
Thanks for any further insight,
Maurits van Rees | http://maurits.vanrees.org/
Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]
Zope-CMF maillist - Zope-CMF@lists.zope.org
See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests