aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/packages
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-06-16 20:30:57 +0000
committerGravatar Yue Gan <yueg@google.com>2016-06-17 09:26:21 +0000
commitbdfd58a8ca2ed5735d6aaa5b238fb0f689515724 (patch)
treefd40061fd63c6d4403d04e94af05d16ded2cab42 /src/main/java/com/google/devtools/build/lib/packages
parent3b62451a3c9e5eba3a892473d406cd02d84db5c3 (diff)
Make the execution root match the runfiles tree structure for external repositories
One interesting side effect of how this is implemented is that for external repositories, bin/ and genfiles/ are combined. External repo output is under bazel-out/local-fastbuild/repo_name for each repo. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. -- MOS_MIGRATED_REVID=125095799
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages')
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/Package.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java
index 44d9e308a3..ae0915e3cd 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Package.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java
@@ -294,7 +294,7 @@ public class Package {
this.filename = builder.getFilename();
this.packageDirectory = filename.getParentDirectory();
- this.sourceRoot = getSourceRoot(filename, packageIdentifier.getPathFragment());
+ this.sourceRoot = getSourceRoot(filename, packageIdentifier.getPackageFragment());
if ((sourceRoot == null
|| !sourceRoot.getRelative(packageIdentifier.getPathFragment()).equals(packageDirectory))
&& !filename.getBaseName().equals("WORKSPACE")) {