cwconfig.py
changeset 2762 b1bb33b37992
parent 2665 0c6281487f90
child 3059 1be8bf42bc5d
--- 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