Chromium Code Reviews| Index: gclient.py |
| diff --git a/gclient.py b/gclient.py |
| index 8d67b5a9eb1a3c4cc5d88ce297e9b32bd7390065..09c64337d85087720c86f18a34e77254e9f62d7a 100755 |
| --- a/gclient.py |
| +++ b/gclient.py |
| @@ -535,12 +535,22 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): |
| deps_content = None |
| use_strict = False |
| - filepath = os.path.join(self.root.root_dir, self.name, self.deps_file) |
| - if not os.path.isfile(filepath): |
| + |
| + # First try to locate the configured deps file. If it's missing, fallback |
| + # to DEPS. |
| + deps_files = [self.deps_file, 'DEPS'] |
|
iannucci
2014/07/01 22:04:08
hm... would be best to uniq-ify this list. Otherwi
cmp
2014/07/01 22:11:50
Fixed. You'll get set()s one way or another. :)
|
| + for deps_file in deps_files: |
| + filepath = os.path.join(self.root.root_dir, self.name, deps_file) |
| + if os.path.isfile(filepath): |
| + logging.info( |
| + 'ParseDepsFile(%s): %s file found at %s' % ( |
|
agable
2014/07/01 22:03:50
While you're here, would be good to update this to
cmp
2014/07/01 22:14:21
Done.
|
| + self.name, deps_file, filepath)) |
| + break |
| logging.info( |
| 'ParseDepsFile(%s): No %s file found at %s' % ( |
| - self.name, self.deps_file, filepath)) |
| - else: |
| + self.name, deps_file, filepath)) |
| + |
| + if os.path.isfile(filepath): |
| deps_content = gclient_utils.FileRead(filepath) |
| logging.debug('ParseDepsFile(%s) read:\n%s' % (self.name, deps_content)) |
| use_strict = 'use strict' in deps_content.splitlines()[0] |