# HG changeset patch # User Sylvain Thénault # Date 1249986105 -7200 # Node ID b1bb33b37992d101dd207cc2b7a26773901a2312 # Parent 7c583d02917b7ecf2f1689784ed90604cafef22c [config] new with_recommends option to expand_cubes diff -r 7c583d02917b -r b1bb33b37992 cwconfig.py --- a/cwconfig.py Tue Aug 11 12:21:09 2009 +0200 +++ b/cwconfig.py Tue Aug 11 12:21:45 2009 +0200 @@ -316,7 +316,7 @@ return getattr(cls.cube_pkginfo(cube), '__recommend__', ()) @classmethod - def expand_cubes(cls, cubes): + def expand_cubes(cls, cubes, with_recommends=False): """expand the given list of top level cubes used by adding recursivly each cube dependencies """ @@ -329,6 +329,12 @@ depcube = CW_MIGRATION_MAP.get(depcube, depcube) cubes.append(depcube) todo.append(depcube) + if with_recommends: + for depcube in cls.cube_recommends(cube): + if depcube not in cubes: + depcube = CW_MIGRATION_MAP.get(depcube, depcube) + cubes.append(depcube) + todo.append(depcube) return cubes @classmethod