# HG changeset patch # User Sylvain Thénault # Date 1308645883 -7200 # Node ID 55b1378e935739d4bf0ca8fe35cbc51939e3c356 # Parent 7cd9fc2adcac28b1a0cb76decaeca3337728bd63# Parent 074a6cec246b892ffcf4d2379e07772fb92d3ab6 backport stable diff -r 7cd9fc2adcac -r 55b1378e9357 cwctl.py --- a/cwctl.py Mon Jun 20 19:13:38 2011 +0200 +++ b/cwctl.py Tue Jun 21 10:44:43 2011 +0200 @@ -757,18 +757,16 @@ applcubicwebversion = vcconf.get('cubicweb') if cubicwebversion > applcubicwebversion: toupgrade.append(('cubicweb', applcubicwebversion, cubicwebversion)) - if not self.config.fs_only and not toupgrade: - print '-> no data migration needed for instance %s.' % appid - self.i18nupgrade(config) - mih.shutdown() - return - for cube, fromversion, toversion in toupgrade: - print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube) # only stop once we're sure we have something to do if not (CWDEV or self.config.nostartstop): StopInstanceCommand(self.logger).stop_instance(appid) # run cubicweb/componants migration scripts - mih.migrate(vcconf, reversed(toupgrade), self.config) + if self.config.fs_only or toupgrade: + for cube, fromversion, toversion in toupgrade: + print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube) + mih.migrate(vcconf, reversed(toupgrade), self.config) + else: + print '-> no data migration needed for instance %s.' % appid # rewrite main configuration file mih.rewrite_configuration() mih.shutdown() diff -r 7cd9fc2adcac -r 55b1378e9357 migration.py --- a/migration.py Mon Jun 20 19:13:38 2011 +0200 +++ b/migration.py Tue Jun 21 10:44:43 2011 +0200 @@ -492,6 +492,8 @@ self.warnings.append( 'cube %s depends on %s but constraint badly ' 'formatted: %s' % (cube, name, constraint)) + else: + self.reverse_dependencies[name].add( (None, None, cube) ) # check consistency for cube, versions in sorted(self.reverse_dependencies.items()): oper, version, source = None, None, None @@ -517,5 +519,7 @@ if oper in ('>=','='): if lower_strict: self.errors.append( ('update', cube, version, source) ) + elif oper is None: + pass # no constraint on version else: print 'unknown operator', oper diff -r 7cd9fc2adcac -r 55b1378e9357 misc/migration/3.12.0_Any.py --- a/misc/migration/3.12.0_Any.py Mon Jun 20 19:13:38 2011 +0200 +++ b/misc/migration/3.12.0_Any.py Tue Jun 21 10:44:43 2011 +0200 @@ -1,2 +1,4 @@ -add_entity_type('TZDatetime') -add_entity_type('TZTime') +if schema['TZDatetime'].eid is None: + add_entity_type('TZDatetime') +if schema['TZTime'].eid is None: + add_entity_type('TZTime')