# HG changeset patch # User Julien Cristau # Date 1402998998 -7200 # Node ID e0e71b45bf8d758b636920e93648f38409e8ddaf # Parent ad0d461ae18be91cec2ffb8db76f081e1856f293 [migration] don't add new elements to config._cubes in remove_cube We're expanding dependencies based on the current versions of the cubes, which may well not be the same as the ones known by the db (we're in the middle of an upgrade, after all). Listing them in config._cubes prevents us from calling add_cube() later to actually add them. Closes #4002156 diff -r ad0d461ae18b -r e0e71b45bf8d migration.py --- a/migration.py Wed Jul 02 11:43:45 2014 +0200 +++ b/migration.py Tue Jun 17 11:56:38 2014 +0200 @@ -413,7 +413,9 @@ toremove = (cube,) origcubes = self.config._cubes basecubes = [c for c in origcubes if not c in toremove] - self.config._cubes = tuple(self.config.expand_cubes(basecubes)) + # don't fake-add any new ones, or we won't be able to really-add them later + self.config._cubes = tuple(cube for cube in self.config.expand_cubes(basecubes) + if cube in origcubes) removed = [p for p in origcubes if not p in self.config._cubes] if not cube in removed and cube in origcubes: raise ConfigurationError("can't remove cube %s, "