You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by la...@apache.org on 2023/08/03 11:25:09 UTC

[impala] branch master updated: IMPALA-12331: Overwrite previous Maven installation if exists

This is an automated email from the ASF dual-hosted git repository.

laszlog pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new ed4642180 IMPALA-12331: Overwrite previous Maven installation if exists
ed4642180 is described below

commit ed4642180c9299ba9a99ef20b368bbaca6bc7738
Author: Laszlo Gaal <la...@cloudera.com>
AuthorDate: Wed Aug 2 20:39:08 2023 +0200

    IMPALA-12331: Overwrite previous Maven installation if exists
    
    The Impala system preparation script bin/bootstrap_system.sh may
    run multiple times on a system. Jenkins-based precommit runs may
    reuse the worker node, or a developer could just run the script
    one more time.
    
    During such a run Maven's current version is downloaded and symlinked
    into /usr/local/bin. However, the script was not prepared for an already
    existing symlink there, and failed if it found one. This is especially
    painful for Jenkins-based runs, where such a failure fails the whole
    build.
    
    This patch fixes this annoying failure by adding -f to the `ln` command
    to disregard any existing symlink.
    
    Change-Id: Ic057103dd770b22dfe27902d435692f54cbb9d3d
    Reviewed-on: http://gerrit.cloudera.org:8080/20305
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 bin/bootstrap_system.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/bootstrap_system.sh b/bin/bootstrap_system.sh
index c619c4756..ef9cfc520 100755
--- a/bin/bootstrap_system.sh
+++ b/bin/bootstrap_system.sh
@@ -346,7 +346,9 @@ if [ ! -d /usr/local/apache-maven-3.9.2 ]; then
     https://archive.apache.org/dist/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz
   sha512sum -c - <<< '900bdeeeae550d2d2b3920fe0e00e41b0069f32c019d566465015bdd1b3866395cbe016e22d95d25d51d3a5e614af2c83ec9b282d73309f644859bbad08b63db  apache-maven-3.9.2-bin.tar.gz'
   sudo tar -C /usr/local -xzf apache-maven-3.9.2-bin.tar.gz
-  sudo ln -s /usr/local/apache-maven-3.9.2/bin/mvn /usr/local/bin
+  # Ensure that Impala's preferred version is installed locally,
+  # even if a previous version exists there.
+  sudo ln -s -f /usr/local/apache-maven-3.9.2/bin/mvn /usr/local/bin
 
   # reset permissions on redhat8
   # TODO: figure out why this is necessary for redhat8