Skip to content

Commit

Permalink
Restore system exit calls for ResourceProcessorBusyBox
Browse files Browse the repository at this point in the history
Closes bazelbuild#10992.

PiperOrigin-RevId: 302025320
  • Loading branch information
jin authored and copybara-github committed Mar 20, 2020
1 parent a6de382 commit e91e181
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
20 changes: 10 additions & 10 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ distdir_tar(
"c7bbde2950769aac9a99364b0926230060a3ce04.tar.gz",
"1.25.0.zip",
"rules_nodejs-1.3.0.tar.gz",
"android_tools_pkg-0.15.1.tar.gz",
"android_tools_pkg-0.16.0.tar.gz",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz",
# bazelbuild/platforms
Expand Down Expand Up @@ -183,7 +183,7 @@ distdir_tar(
"1.25.0.zip": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647",
# rules_nodejs
"rules_nodejs-1.3.0.tar.gz": "b6670f9f43faa66e3009488bbd909bc7bc46a5a9661a33f6bc578068d1837f37",
"android_tools_pkg-0.15.1.tar.gz": "6b9b9a88a700ae0cdeb75d787f55cab2e939e19af81345e68c9be34f733a2abb",
"android_tools_pkg-0.16.0.tar.gz": "e2cbd43a9d23aa32197c29d689a7e017f205acb07053f5dd584f500a1a9d4361",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": "c00ceec469dbcf7929972e3c79f20c14033824538038a554952f5c31d8832f96",
# bazelbuild/platforms
Expand Down Expand Up @@ -230,8 +230,8 @@ distdir_tar(
"https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/archive/rules_nodejs-1.3.0.tar.gz",
"https://github.com/bazelbuild/rules_nodejs/archive/rules_nodejs-1.3.0.tar.gz",
],
"android_tools_pkg-0.15.1.tar.gz": [
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.15.1.tar.gz",
"android_tools_pkg-0.16.0.tar.gz": [
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.16.0.tar.gz",
],
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": [
Expand Down Expand Up @@ -482,7 +482,7 @@ distdir_tar(
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz",
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz",
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip",
"android_tools_pkg-0.15.1.tar.gz",
"android_tools_pkg-0.16.0.tar.gz",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz",
# bazelbuild/platforms
Expand All @@ -506,7 +506,7 @@ distdir_tar(
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4",
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f",
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18",
"android_tools_pkg-0.15.1.tar.gz": "6b9b9a88a700ae0cdeb75d787f55cab2e939e19af81345e68c9be34f733a2abb",
"android_tools_pkg-0.16.0.tar.gz": "e2cbd43a9d23aa32197c29d689a7e017f205acb07053f5dd584f500a1a9d4361",
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": "c00ceec469dbcf7929972e3c79f20c14033824538038a554952f5c31d8832f96",
# bazelbuild/platforms
Expand All @@ -529,8 +529,8 @@ distdir_tar(
"zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz"],
"zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"],
"zulu11.37.17-ca-jdk11.0.6-win_x64.zip": ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"],
"android_tools_pkg-0.15.1.tar.gz": [
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.15.1.tar.gz",
"android_tools_pkg-0.16.0.tar.gz": [
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.16.0.tar.gz",
],
# bazelbuild/bazel-skylib
"2d4c9528e0f453b5950eeaeac11d8d09f5a504d4.tar.gz": [
Expand Down Expand Up @@ -628,8 +628,8 @@ http_archive(
name = "android_tools_for_testing",
patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE,
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN,
sha256 = "6b9b9a88a700ae0cdeb75d787f55cab2e939e19af81345e68c9be34f733a2abb", # DO_NOT_REMOVE_THIS_ANDROID_TOOLS_UPDATE_MARKER
url = "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.15.1.tar.gz",
sha256 = "e2cbd43a9d23aa32197c29d689a7e017f205acb07053f5dd584f500a1a9d4361", # DO_NOT_REMOVE_THIS_ANDROID_TOOLS_UPDATE_MARKER
url = "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.16.0.tar.gz",
)

# This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/coverage.WORKSPACE.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This must be kept in sync with the top-level WORKSPACE file.
http_archive(
name = "android_tools",
sha256 = "6b9b9a88a700ae0cdeb75d787f55cab2e939e19af81345e68c9be34f733a2abb",
url = "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.15.1.tar.gz",
sha256 = "e2cbd43a9d23aa32197c29d689a7e017f205acb07053f5dd584f500a1a9d4361",
url = "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.16.0.tar.gz",
)
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ public static void main(String[] args) throws Exception {
// initialize Options/OptionsParser here. This keeps the processRequest interface minimal and
// minimizes moving option state between these methods.
if (args.length == 1 && args[0].equals("--persistent_worker")) {
runPersistentWorker();
System.exit(runPersistentWorker());
} else {
processRequest(Arrays.asList(args));
System.exit(processRequest(Arrays.asList(args)));
}
}

private static void runPersistentWorker() throws Exception {
private static int runPersistentWorker() throws Exception {
while (true) {
try {
WorkRequest request = WorkRequest.parseDelimitedFrom(System.in);
Expand All @@ -194,8 +194,10 @@ private static void runPersistentWorker() throws Exception {
} catch (IOException e) {
logger.severe(e.getMessage());
e.printStackTrace();
return 1;
}
}
return 0;
}

private static int processRequest(List<String> args) throws Exception {
Expand Down
4 changes: 2 additions & 2 deletions tools/android/runtime_deps/upload_android_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
set -euo pipefail

# The version of android_tools.tar.gz
VERSION="0.15.1"
VERSION="0.16.0"
VERSIONED_FILENAME="android_tools_pkg-$VERSION.tar.gz"

# Create a temp directory to hold the versioned tarball, and clean it up when the script exits.
Expand Down Expand Up @@ -59,7 +59,7 @@ echo

cat <<EOF
sed -i 's/android_tools_pkg.*\.tar\.gz/$VERSIONED_FILENAME/g' WORKSPACE && \\
sed -i 's/"[0-9a-fA-F]\{64\}", # DO_NOT_REMOVE_THIS_ANDROID_TOOLS_UPDATE_MARKER/"$checksum", # ANDROID_TOOLS_UPDATE_MARKER_DO_NOT_REMOVE/g' WORKSPACE && \\
sed -i 's/"[0-9a-fA-F]\{64\}", # DO_NOT_REMOVE_THIS_ANDROID_TOOLS_UPDATE_MARKER/"$checksum", # DO_NOT_REMOVE_THIS_ANDROID_TOOLS_UPDATE_MARKER/g' WORKSPACE && \\
sed -i 's/"android_tools_pkg.*[0-9a-FA-F]\{64\}",.*/"$VERSIONED_FILENAME": "$checksum",/g' WORKSPACE && \\
sed -i 's/android_tools_pkg.*\.tar\.gz/$VERSIONED_FILENAME/g' src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_remote_tools.WORKSPACE && \\
sed -i 's/"[0-9a-fA-F]\{64\}",.*/"$checksum",/g' src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_remote_tools.WORKSPACE
Expand Down

0 comments on commit e91e181

Please sign in to comment.