From a665f8fa82a6b02030035c4df6bcc5c218e77ab5 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 4 Oct 2022 08:50:28 -0700 Subject: [PATCH] Only show the base name of archives being extracted. Most of the archive path is a long absolute path into Bazel internal directories, which is not interesting to look at. Closes #16363. PiperOrigin-RevId: 478799955 Change-Id: I047bdc85e9100af74a6854893c5befea17e673b1 --- .../bazel/repository/starlark/StarlarkBaseExternalContext.java | 3 ++- .../bazel/repository/starlark/StarlarkRepositoryContext.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java index d01c085945219d..e1c53456223812 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java @@ -715,7 +715,8 @@ public StructImpl downloadAndExtract( Profiler.instance().profile("extracting: " + getIdentifyingStringForLogging())) { env.getListener() .post( - new ExtractProgress(outputPath.getPath().toString(), "Extracting " + downloadedPath)); + new ExtractProgress( + outputPath.getPath().toString(), "Extracting " + downloadedPath.getBaseName())); DecompressorValue.decompress( DecompressorDescriptor.builder() .setContext(getIdentifyingStringForLogging()) diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryContext.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryContext.java index 3f3d271153d801..2a8b59d80e5d25 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryContext.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryContext.java @@ -489,7 +489,7 @@ public void extract( env.getListener() .post( new ExtractProgress( - outputPath.getPath().toString(), "Extracting " + archivePath.getPath())); + outputPath.getPath().toString(), "Extracting " + archivePath.getBasename())); DecompressorValue.decompress( DecompressorDescriptor.builder() .setContext(getIdentifyingStringForLogging())