depgraph._add_pkg: preserve previous pkg depth
authorZac Medico <zmedico@gentoo.org>
Sun, 17 Jun 2012 19:44:56 +0000 (12:44 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 17 Jun 2012 19:47:48 +0000 (12:47 -0700)
pym/_emerge/depgraph.py

index 8aa53aa595195a844d24fee53584de6ccc30ac50..9aa9d0430a95cd98b7b1b85b26670fbb772bf6e0 100644 (file)
@@ -1345,6 +1345,8 @@ class depgraph(object):
                # If we are in --nodeps (no recursion) mode, we obviously only check 1 level of dependencies.
                if arg_atoms:
                        depth = 0
+               if previously_added and pkg.depth is not None:
+                       depth = min(pkg.depth, depth)
                pkg.depth = depth
                deep = self._dynamic_config.myparams.get("deep", 0)
                recurse = deep is True or depth + 1 <= deep