aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2015-05-18 15:02:13 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-05-18 20:01:59 +0000
commitafebc0d53191ac81019c49d1f201cb2b9051fd50 (patch)
tree764833705c9488858fd024b06dd5bd6e24b70501 /src/main
parent817d75143bb45f1297c169aeaed86a72e25d31a2 (diff)
Removed special handling of the tools package in the namespace sandbox
The tools package was mounted separately but it was composed mostly of symlinks leading outside of the sandbox. To resolve the issue, copy all the inputs in the sandbox is actually the easiest solution. -- MOS_MIGRATED_REVID=93888195
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/standalone/NamespaceSandboxRunner.java12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/standalone/NamespaceSandboxRunner.java b/src/main/java/com/google/devtools/build/lib/standalone/NamespaceSandboxRunner.java
index 3d7ccd4bf1..523fb7e947 100644
--- a/src/main/java/com/google/devtools/build/lib/standalone/NamespaceSandboxRunner.java
+++ b/src/main/java/com/google/devtools/build/lib/standalone/NamespaceSandboxRunner.java
@@ -51,7 +51,6 @@ public class NamespaceSandboxRunner {
private final Path sandboxPath;
private final List<String> mounts;
private final Path embeddedBinaries;
- private final Path tools;
private final ImmutableList<PathFragment> includeDirectories;
private final PathFragment includePrefix;
private final Spawn spawn;
@@ -65,7 +64,6 @@ public class NamespaceSandboxRunner {
directories.getExecRoot().getRelative("sandboxes").getRelative(sandboxDirectory);
this.debug = debug;
this.mounts = new ArrayList<>();
- this.tools = directories.getExecRoot().getChild("tools");
this.embeddedBinaries = directories.getEmbeddedBinariesRoot();
this.includePrefix = includePrefix;
this.includeDirectories = ImmutableList.copyOf(includeDirectories);
@@ -150,10 +148,6 @@ public class NamespaceSandboxRunner {
if (input.getExecPathString().contains("internal/_middlemen/")) {
continue;
}
- // entire tools will be mounted in the sandbox, so don't copy parts of it
- if (input.getExecPathString().startsWith("tools/")) {
- continue;
- }
Path target = sandboxPath.getRelative(input.getExecPathString());
Path source = execRoot.getRelative(input.getExecPathString());
FileSystemUtils.createDirectoryAndParents(target.getParentDirectory());
@@ -208,10 +202,6 @@ public class NamespaceSandboxRunner {
Files.copy(new File(this.embeddedBinaries.getChild("build-runfiles").getPathString()),
new File(bin.getChild("build-runfiles").getPathString()));
FilesystemUtils.chmod(bin.getChild("build-runfiles").getPathString(), 0755);
- // TODO(bazel-team) filter tools out of input files instead
- // some of the tools could be in inputs; we will mount entire tools anyway so it's just
- // easier to remove them and remount inside sandbox
- FilesystemUtils.rmTree(sandboxPath.getChild("tools").getPathString());
}
@@ -243,8 +233,6 @@ public class NamespaceSandboxRunner {
if (debug) {
args.add("-D");
}
- args.add("-t");
- args.add(tools.getPathString());
args.add("-S");
args.add(sandboxPath.getPathString());