[Zope-CMF] GenericSetup: comparing version numbers

Maurits van Rees m.van.rees at zestsoftware.nl
Mon Nov 16 12:07:54 EST 2009


Hi,

In the metadata.xml in your profile the best practice is currently to
use plain version numbers, right?  So just 1, then 2, then 3 etc and
not 1.0 then 1.1 then 1.2, right?

Using plain version numbers I have just hit a problem that I find
strange that I have not hit before.  An upgrade step from 8 to 9 went
fine.  Then I did an upgrade step from 9 to 10 and suddenly
portal_setup listed theprevious upgrade step as available, since '10'
was alphabetically smaller than '9'...

As a workaround I added one or more zeroes to the source, destination
and metadata.xml version numbers and then it works.  I will hit the
next problem after the 99th upgrade step. ;-)

Should we change this in GenericSetup itself and add some zeroes in
front when comparing numbers?

Cheers,

-- 
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]



More information about the Zope-CMF mailing list