Skip to content

Commit

Permalink
Works around limitations in upgrades system
Browse files Browse the repository at this point in the history
We need to make sure we get to 1.0.1 via explicit upgrades.
  • Loading branch information
remram44 committed Apr 8, 2015
1 parent c9f19dd commit 3e3109a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion vistrails/packages/vtk/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
###############################################################################
from __future__ import division

import copy
import re
import os.path

Expand Down Expand Up @@ -657,13 +658,27 @@ def handle_module_upgrade_request(controller, module_id, pipeline):
try:
from vistrails.packages.spreadsheet.init import upgrade_cell_to_output
except ImportError:
module_remap = _remap
# Manually upgrade to 1.0.1
if _remap.get_module_remaps(module_name):
module_remap = copy.copy(_remap)
module_remap.add_module_remap(
UpgradeModuleRemap('1.0.0', '1.0.1', '1.0.1',
module_name=module_name))
else:
module_remap = _remap
else:
module_remap = upgrade_cell_to_output(
_remap, module_id, pipeline,
'VTKCell', 'vtkRendererOutput',
'1.0.1', 'AddRenderer',
start_version='1.0.0')
if _remap.get_module_remaps(module_name):
remap = module_remap.get_module_upgrade(module_name, '1.0.0')
if remap is None:
# Manually upgrade to 1.0.1
module_remap.add_module_remap(
UpgradeModuleRemap('1.0.0', '1.0.1', '1.0.1',
module_name=module_name))

return UpgradeWorkflowHandler.remap_module(controller, module_id, pipeline,
module_remap)

0 comments on commit 3e3109a

Please sign in to comment.