351 except OSError, ex: |
351 except OSError, ex: |
352 import errno |
352 import errno |
353 if ex.errno != errno.ENOENT: |
353 if ex.errno != errno.ENOENT: |
354 raise |
354 raise |
355 confignames = ', '.join([config.name for config in configs]) |
355 confignames = ', '.join([config.name for config in configs]) |
356 print 'instance %s (%s) deleted' % (appid, confignames) |
356 print '-> instance %s (%s) deleted.' % (appid, confignames) |
357 |
357 |
358 |
358 |
359 # instance commands ######################################################## |
359 # instance commands ######################################################## |
360 |
360 |
361 class StartInstanceCommand(InstanceCommand): |
361 class StartInstanceCommand(InstanceCommand): |
654 toupgrade.append(('cubicweb', applcubicwebversion, cubicwebversion)) |
654 toupgrade.append(('cubicweb', applcubicwebversion, cubicwebversion)) |
655 if not self.config.fs_only and not toupgrade: |
655 if not self.config.fs_only and not toupgrade: |
656 print '-> no software migration needed for instance %s.' % appid |
656 print '-> no software migration needed for instance %s.' % appid |
657 return |
657 return |
658 for cube, fromversion, toversion in toupgrade: |
658 for cube, fromversion, toversion in toupgrade: |
659 print '\n' + underline_title('%s migration %s -> %s' % |
659 print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube) |
660 (cube, fromversion, toversion)) |
|
661 # only stop once we're sure we have something to do |
660 # only stop once we're sure we have something to do |
662 if not (cwcfg.mode == 'dev' or self.config.nostartstop): |
661 if not (cwcfg.mode == 'dev' or self.config.nostartstop): |
663 self.stop_instance(appid) |
662 self.stop_instance(appid) |
664 # run cubicweb/componants migration scripts |
663 # run cubicweb/componants migration scripts |
665 mih.migrate(vcconf, reversed(toupgrade), self.config) |
664 mih.migrate(vcconf, reversed(toupgrade), self.config) |