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

dongjoon pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 3f2ba77  [SPARK-34820][K8S][R] add apt-update before gnupg install
3f2ba77 is described below

commit 3f2ba77dfe58d67f0d7eba73247b5ea362157152
Author: Yikun Jiang <yikunk...@gmail.com>
AuthorDate: Mon Mar 22 10:13:31 2021 -0700

    [SPARK-34820][K8S][R] add apt-update before gnupg install
    
    ### What changes were proposed in this pull request?
    We added the gnupg installation in 
https://github.com/apache/spark/pull/30130 , we should do apt update before 
gnupg isntallation, otherwise we will get a fetch error when package is updated.
    
    See more in:
    [1] 
http://apache-spark-developers-list.1001551.n3.nabble.com/K8s-Integration-test-is-unable-to-run-because-of-the-unavailable-libs-td30986.html
    
    ### Why are the changes needed?
    add a apt-update cmd before gnupg installation to avoid invaild package 
cache list.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    K8s Integration test passed
    
    Closes #31923 from Yikun/SPARK-34820.
    
    Authored-by: Yikun Jiang <yikunk...@gmail.com>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
    (cherry picked from commit 31da90762efbcebc0fcdde885635612a5bcd5f6d)
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 .../kubernetes/docker/src/main/dockerfiles/spark/bindings/R/Dockerfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/bindings/R/Dockerfile
 
b/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/bindings/R/Dockerfile
index f63f2d0..2dd4d8c 100644
--- 
a/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/bindings/R/Dockerfile
+++ 
b/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/bindings/R/Dockerfile
@@ -27,8 +27,9 @@ RUN mkdir ${SPARK_HOME}/R
 
 # Install R 3.6.3 (http://cloud.r-project.org/bin/linux/debian/)
 RUN \
-  echo "deb http://cloud.r-project.org/bin/linux/debian buster-cran35/" >> 
/etc/apt/sources.list && \
+  apt-get update && \
   apt install -y gnupg && \
+  echo "deb http://cloud.r-project.org/bin/linux/debian buster-cran35/" >> 
/etc/apt/sources.list && \
   (apt-key adv --keyserver keys.gnupg.net --recv-key 
'E19F5F87128899B192B1A2C2AD5F960A256A04AF' || apt-key adv --keyserver 
keys.openpgp.org --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF') && \
   apt-get update && \
   apt install -y -t buster-cran35 r-base r-base-dev && \

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to