diff --git a/gclient.py b/gclient.py index a8e8770ad..89fbc27aa 100755 --- a/gclient.py +++ b/gclient.py @@ -1768,6 +1768,10 @@ class Flattener(object): deps_files = set() def add_deps_file(dep): + # Only include DEPS files referenced by recursedeps. + if not (dep.parent is None or + (dep.name in (dep.parent.recursedeps or {}))): + return deps_path = os.path.join(self._client.root_dir, dep.name, dep.deps_file) if not os.path.exists(deps_path): return diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py index f1ffefce8..ffcbd19fe 100755 --- a/tests/gclient_smoketest.py +++ b/tests/gclient_smoketest.py @@ -719,8 +719,6 @@ class GClientSmokeGIT(GClientSmokeBase): '', '# git://127.0.0.1:20000/git/repo_2@%s, DEPS' % ( self.githash('repo_2', 1)[:7]), - '# git://127.0.0.1:20000/git/repo_5, DEPS', - '# git://127.0.0.1:20000/git/repo_6, DEPS', '# git://127.0.0.1:20000/git/repo_8, DEPS' ], deps_contents.splitlines()) @@ -876,10 +874,6 @@ class GClientSmokeGIT(GClientSmokeBase): '', '# git://127.0.0.1:20000/git/repo_2@%s, DEPS' % ( self.githash('repo_2', 1)), - '# git://127.0.0.1:20000/git/repo_5@%s, DEPS' % ( - self.githash('repo_5', 3)), - '# git://127.0.0.1:20000/git/repo_6@%s, DEPS' % ( - self.githash('repo_6', 1)), '# git://127.0.0.1:20000/git/repo_8@%s, DEPS' % ( self.githash('repo_8', 1)), ], deps_contents.splitlines()) @@ -977,11 +971,7 @@ class GClientSmokeGIT(GClientSmokeBase): '', '}', '', - '# git://127.0.0.1:20000/git/repo_10, DEPS', '# git://127.0.0.1:20000/git/repo_11, DEPS', - '# git://127.0.0.1:20000/git/repo_5, DEPS', - '# git://127.0.0.1:20000/git/repo_6, DEPS', - '# git://127.0.0.1:20000/git/repo_7, DEPS', '# git://127.0.0.1:20000/git/repo_8, DEPS', '# git://127.0.0.1:20000/git/repo_9, DEPS', ], deps_contents.splitlines())