diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-05 17:41:38 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-05 17:41:38 +0000 |
commit | a8cf61b1bd02bf47aca467f64f9ca91916252f75 (patch) | |
tree | 20303ecb76660fec2875a6cb01b95dee44e0649b | |
parent | 97f39881651f029c96194d4c9d99b8aa0ad6f90e (diff) | |
download | chromium_src-a8cf61b1bd02bf47aca467f64f9ca91916252f75.zip chromium_src-a8cf61b1bd02bf47aca467f64f9ca91916252f75.tar.gz chromium_src-a8cf61b1bd02bf47aca467f64f9ca91916252f75.tar.bz2 |
Fix the dependency checker tool. Rules for a directory did modify their directory parent rules. Using copy.copy() solves the problem.Additional fix when "allow-current-directory" rules was not applied if DEPS file is missing.
Updated few DEPS file with reasonable rules.
To prevent tree closing other dependencies are added. These need to be either legitimated or dependency removed.
Review URL: http://codereview.chromium.org/21025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9221 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | chrome/browser/DEPS | 7 | ||||
-rw-r--r-- | chrome/common/DEPS | 18 | ||||
-rw-r--r-- | chrome/common/gfx/DEPS | 4 | ||||
-rw-r--r-- | chrome/installer/setup/DEPS | 3 | ||||
-rw-r--r-- | chrome/plugin/DEPS | 9 | ||||
-rw-r--r-- | chrome/renderer/DEPS | 15 | ||||
-rw-r--r-- | chrome/test/DEPS | 3 | ||||
-rw-r--r-- | chrome/third_party/hunspell/google/DEPS | 3 | ||||
-rw-r--r-- | chrome/tools/DEPS | 5 | ||||
-rw-r--r-- | chrome/views/DEPS | 9 | ||||
-rw-r--r-- | net/base/DEPS | 5 | ||||
-rwxr-xr-x | tools/checkdeps/checkdeps.py | 18 | ||||
-rw-r--r-- | webkit/DEPS | 7 | ||||
-rw-r--r-- | webkit/glue/DEPS | 6 | ||||
-rw-r--r-- | webkit/tools/DEPS | 4 |
15 files changed, 104 insertions, 12 deletions
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS index f662673..cb177e3 100755 --- a/chrome/browser/DEPS +++ b/chrome/browser/DEPS @@ -1,8 +1,15 @@ include_rules = [ + "+chrome/app", + "+chrome/app/theme", # For resource identifiers + "+chrome/app/locales", "+chrome/installer", + "+chrome/personalization", "+chrome/tools", "+chrome/tools/profiles", # For history unit tests. "+chrome/views", + "+sandbox/src", + "+skia/include", + "+skia/ext", "+webkit/activex_shim", "+webkit/default_plugin", "+webkit/glue", # Defines some types that are marshalled over IPC. diff --git a/chrome/common/DEPS b/chrome/common/DEPS index fdd760a..3fd1671 100644 --- a/chrome/common/DEPS +++ b/chrome/common/DEPS @@ -1,8 +1,20 @@ include_rules = [ "+chrome/plugin", # For checking whether we're a plugin process. - + "+libxml", + "+sandbox/src", + "+skia/include", + "+webkit/glue", + # Other libraries. "+third_party/bzip2", "+third_party/npapi", -] - + "+third_party/sqlite", + "+third_party/zlib", + + # FIXME - refactor code and remove these dependencies + "+chrome/app", + "+chrome/browser", + "+chrome/browser/net", + "+chrome/renderer", + "+chrome/views", +]
\ No newline at end of file diff --git a/chrome/common/gfx/DEPS b/chrome/common/gfx/DEPS new file mode 100644 index 0000000..88f24d3 --- /dev/null +++ b/chrome/common/gfx/DEPS @@ -0,0 +1,4 @@ +include_rules = [
+ "+skia/include",
+ "+skia/ext",
+];
\ No newline at end of file diff --git a/chrome/installer/setup/DEPS b/chrome/installer/setup/DEPS new file mode 100644 index 0000000..ab2a48a --- /dev/null +++ b/chrome/installer/setup/DEPS @@ -0,0 +1,3 @@ +include_rules = [
+ "+chrome/app",
+]
diff --git a/chrome/plugin/DEPS b/chrome/plugin/DEPS new file mode 100644 index 0000000..0d9d3a6 --- /dev/null +++ b/chrome/plugin/DEPS @@ -0,0 +1,9 @@ +include_rules = [
+ "+chrome/renderer",
+ "+sandbox/src",
+ "+skia/ext",
+ "+third_party/npapi",
+ "+webkit/glue",
+ "+webkit/glue/plugins",
+]
+
diff --git a/chrome/renderer/DEPS b/chrome/renderer/DEPS index a9c8e70..d533df4 100644 --- a/chrome/renderer/DEPS +++ b/chrome/renderer/DEPS @@ -1,5 +1,18 @@ include_rules = [ + "+chrome/app", # The plugins use the theme library to get the sad plugin bitmap. + "+chrome/personalization", + "+chrome/plugin", "+media/base", # For HTML5 media rendering. - "+webkit/port", # For certain drawing, would be nice to not have. + "+sandbox/src", + "+skia/ext", + "+skia/include", + "+webkit/default_plugin", + "+webkit/glue", + "+webkit/glue/plugins", + + # FIXME - refactor code and remove these dependencies + "+chrome/app/theme", + "+chrome/browser/net", + "+chrome/views", ] diff --git a/chrome/test/DEPS b/chrome/test/DEPS index 70906cf..f6a76e9 100644 --- a/chrome/test/DEPS +++ b/chrome/test/DEPS @@ -1,4 +1,7 @@ include_rules = [ # The test directory can do whatever it wants in chrome. "+chrome", + "+sandbox/src", + "+sandbox/tests", + "+webkit/glue", ] diff --git a/chrome/third_party/hunspell/google/DEPS b/chrome/third_party/hunspell/google/DEPS new file mode 100644 index 0000000..ab03e0d4 --- /dev/null +++ b/chrome/third_party/hunspell/google/DEPS @@ -0,0 +1,3 @@ +include_rules = [
+ "+chrome/tools/convert_dict",
+]
diff --git a/chrome/tools/DEPS b/chrome/tools/DEPS new file mode 100644 index 0000000..376e9fc --- /dev/null +++ b/chrome/tools/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+chrome/browser/history", + "+chrome/third_party/hunspell/google", + "+skia/ext", +] diff --git a/chrome/views/DEPS b/chrome/views/DEPS new file mode 100644 index 0000000..7256113 --- /dev/null +++ b/chrome/views/DEPS @@ -0,0 +1,9 @@ +include_rules = [
+ "+chrome/app",
+ "+chrome/app/theme",
+ "+chrome/browser",
+ "+chrome/browser/views",
+ "+skia/ext",
+ "+skia/include",
+ "+webkit/glue",
+]
diff --git a/net/base/DEPS b/net/base/DEPS new file mode 100644 index 0000000..ab5795a5 --- /dev/null +++ b/net/base/DEPS @@ -0,0 +1,5 @@ +include_rules = [
+ "+third_party/bzip2",
+ "+third_party/npapi",
+ "+third_party/zlib",
+]
diff --git a/tools/checkdeps/checkdeps.py b/tools/checkdeps/checkdeps.py index 5ef4de3..6124eeb 100755 --- a/tools/checkdeps/checkdeps.py +++ b/tools/checkdeps/checkdeps.py @@ -56,6 +56,7 @@ import os import optparse import re import sys +import copy # Variable name used in the DEPS file to specify module-level deps. DEPS_VAR_NAME = "deps" @@ -180,7 +181,7 @@ def ApplyRules(existing_rules, deps, includes, cur_dir): Returns: A new set of rules combining the existing_rules with the other arguments. """ - rules = existing_rules + rules = copy.copy(existing_rules) # First apply the implicit "allow" rule for the current directory. if cur_dir.lower().startswith(BASE_DIRECTORY): @@ -255,13 +256,14 @@ def ApplyDirectoryRules(existing_rules, dir_name): local_scope = {} global_scope = {"From": FromImpl, "Var": _VarImpl(local_scope).Lookup} deps_file = os.path.join(dir_name, "DEPS") - if not os.path.exists(deps_file): - if VERBOSE: - print " No deps file found in", dir_name - return (existing_rules, []) # Nothing to change from the input rules. - execfile(deps_file, global_scope, local_scope) + if os.path.exists(deps_file): + execfile(deps_file, global_scope, local_scope) + elif VERBOSE: + print " No deps file found in", dir_name + # Even if a DEPS file does not exist we still invoke ApplyRules + # to apply the implicit "allow" rule for the current directory deps = local_scope.get(DEPS_VAR_NAME, {}) include_rules = local_scope.get(INCLUDE_RULES_VAR_NAME, []) skip_subdirs = local_scope.get(SKIP_SUBDIRS_VAR_NAME, []) @@ -348,8 +350,8 @@ def CheckFile(rules, file_name): return ret_val -def CheckDirectory(rules, dir_name): - (rules, skip_subdirs) = ApplyDirectoryRules(rules, dir_name) +def CheckDirectory(parent_rules, dir_name): + (rules, skip_subdirs) = ApplyDirectoryRules(parent_rules, dir_name) if rules == None: return True diff --git a/webkit/DEPS b/webkit/DEPS index c0c8533..120eb9f 100644 --- a/webkit/DEPS +++ b/webkit/DEPS @@ -9,4 +9,11 @@ skip_child_includes = [ include_rules = [ # For bridge/c/c_utility.h in npruntime_util.cc "+bridge", + + # TODO(brettw) - review these; move up if it's ok, or remove the dependency + "+net/base", + "+net/http", + "+net/proxy", + "+net/url_request", + "+third_party/npapi/bindings", ] diff --git a/webkit/glue/DEPS b/webkit/glue/DEPS index a9f4fff..beea903 100644 --- a/webkit/glue/DEPS +++ b/webkit/glue/DEPS @@ -1,7 +1,13 @@ include_rules = [ + "+skia/ext", + "+skia/include", "+webkit/tools/test_shell", # Needed for test shell tests. # This is not actually a directory, but npruntime_util.cc includes a file # from WebKit starting with this path in JSCore mode. "+bindings/c", + + # FIXME - refactor code and remove these dependencies + "+chrome/browser", + "+chrome/common", ] diff --git a/webkit/tools/DEPS b/webkit/tools/DEPS new file mode 100644 index 0000000..ef02b16 --- /dev/null +++ b/webkit/tools/DEPS @@ -0,0 +1,4 @@ +include_rules = [
+ "+chrome/common",
+ "+skia/ext",
+]
|