buildBazelPackage: cleanup hacks and enforce them for all builds
Timestamp verification skip is no longer needed (not sure why). Generally we better off always using the environment hack for all packages because that ensures all NIX_* flags are correctly applied. One possible improvement in future is to filter only NIX_* variables to passthru in Bazel.
This commit is contained in:
@@ -1,31 +1,3 @@
|
||||
diff -Naur a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
|
||||
--- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java 2019-06-12 20:39:37.420705161 -0700
|
||||
+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java 2019-06-12 20:44:18.894429744 -0700
|
||||
@@ -428,24 +428,7 @@
|
||||
try {
|
||||
content = FileSystemUtils.readContent(markerPath, StandardCharsets.UTF_8);
|
||||
String markerRuleKey = readMarkerFile(content, markerData);
|
||||
- boolean verified = false;
|
||||
- if (Preconditions.checkNotNull(ruleKey).equals(markerRuleKey)
|
||||
- && Objects.equals(
|
||||
- markerData.get(MANAGED_DIRECTORIES_MARKER),
|
||||
- this.markerData.get(MANAGED_DIRECTORIES_MARKER))) {
|
||||
- verified = handler.verifyMarkerData(rule, markerData, env);
|
||||
- if (env.valuesMissing()) {
|
||||
- return null;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (verified) {
|
||||
return new Fingerprint().addString(content).digestAndReset();
|
||||
- } else {
|
||||
- // So that we are in a consistent state if something happens while fetching the repository
|
||||
- markerPath.delete();
|
||||
- return null;
|
||||
- }
|
||||
} catch (IOException e) {
|
||||
throw new RepositoryFunctionException(e, Transience.TRANSIENT);
|
||||
}
|
||||
diff -Naur a/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java b/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java
|
||||
--- a/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java 2019-06-12 20:39:37.538708196 -0700
|
||||
+++ b/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java 2019-06-12 20:44:18.863429602 -0700
|
||||
|
||||
Reference in New Issue
Block a user