aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2016-01-13 10:47:29 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-01-13 13:19:28 +0000
commit485eb969bbfbfbeb7d9501fa2b8f4e6ac5aa7da7 (patch)
tree18996457a94174100b600cf95223ae9385d7015b /src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
parent0e396b827bca5ee507aadc875169e47d959a7136 (diff)
Make package names in the package_group.packages attribute refer to the repository where the package group is.
There is currently no way to refer to packages in other repositories and that doesn't seem to be useful, because visibility currently checks the repository name in the label and that can be changed in the main WORKSPACE file. If needed, it'd be pretty easy to implement, though. As a drive-by fix, made the parsing of the package name call into the same logic implemented in the cmdline package because code duplication is bad, mmmkay? Fixes #767. -- MOS_MIGRATED_REVID=112032508
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
index cc9951458f..0282489405 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -1215,7 +1215,7 @@ public final class RuleContext extends TargetContext
// Check visibility attribute
for (PackageSpecification specification :
prerequisite.getProvider(VisibilityProvider.class).getVisibility()) {
- if (specification.containsPackage(rule.getLabel().getPackageFragment())) {
+ if (specification.containsPackage(rule.getLabel().getPackageIdentifier())) {
return true;
}
}