diff options
author | Eric Fellheimer <felly@google.com> | 2015-11-12 02:28:44 +0000 |
---|---|---|
committer | Laszlo Csomor <laszlocsomor@google.com> | 2015-11-12 09:03:01 +0000 |
commit | 7ef96d778a0baf8c4e3a06bf50a4651e3e8bf1fe (patch) | |
tree | 6160e79f854d50c5e76ab845cef10b62f21b8be8 /src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java | |
parent | cbb69f247adc1901ef6b7b52a6f12192f6131f72 (diff) |
Allow package blacklisting to be done via a file checked into the depot. By default this is disabled.
--
MOS_MIGRATED_REVID=107644420
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java index 3a4f7d66d9..28557d1b9c 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageLookupFunction.java @@ -73,13 +73,14 @@ public class PackageLookupFunction implements SkyFunction { return PackageLookupValue.DELETED_PACKAGE_VALUE; } - ImmutableSet<PathFragment> patterns = PrecomputedValue.BLACKLISTED_PKG_PREFIXES.get(env); - if (patterns == null) { + BlacklistedPackagePrefixesValue blacklistedPatternsValue = + (BlacklistedPackagePrefixesValue) env.getValue(BlacklistedPackagePrefixesValue.key()); + if (blacklistedPatternsValue == null) { return null; } PathFragment buildFileFragment = packageKey.getPackageFragment(); - for (PathFragment pattern : patterns) { + for (PathFragment pattern : blacklistedPatternsValue.getPatterns()) { if (buildFileFragment.startsWith(pattern)) { return PackageLookupValue.DELETED_PACKAGE_VALUE; } |