From a042264949333f0e20b6d88362be1b388ceba4e0 Mon Sep 17 00:00:00 2001 From: Yuki Shiino Date: Thu, 4 Aug 2022 08:14:15 +0000 Subject: [PATCH] Allow 'noparent' in DEPS In case of PartitionAlloc project in Chromium, there is a case that it's useful to declare 'noparent' in the DEPS due to the situation that a sub directory is exported to a standalone git project. //base/allocator/partition_allocator/ (sub directory) is exported to https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator.git Change-Id: Ic51b6cd3928002962f25620b4d8797bed7802d1e Bug: chromium:1151236 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3802719 Reviewed-by: Gavin Mak Commit-Queue: Yuki Shiino Reviewed-by: Joanna Wang --- gclient_eval.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gclient_eval.py b/gclient_eval.py index 11141d118..297ae07d4 100644 --- a/gclient_eval.py +++ b/gclient_eval.py @@ -202,6 +202,14 @@ _GCLIENT_SCHEMA = schema.Schema( # Also see 'skip_child_includes' and 'specific_include_rules'. schema.Optional('include_rules'): [schema.Optional(basestring)], + # Optionally discards rules from parent directories, similar to + # "noparent" in OWNERS files. For example, if + # //base/allocator/partition_allocator has "noparent = True" then it + # will not inherit rules from //base/DEPS and //base/allocator/DEPS, + # forcing each //base/allocator/partition_allocator/{foo,bar,...} to + # declare all its dependencies. + schema.Optional('noparent'): bool, + # Hooks executed before processing DEPS. See 'hooks' for more details. schema.Optional('pre_deps_hooks'): _GCLIENT_HOOKS_SCHEMA,