Merge pull request #1117 from minrk/r-base-core

Only get R itself (r-base-core) from apt, not CRAN packages
pull/1115/head
Yuvi Panda 2022-01-25 18:39:45 +05:30 zatwierdzone przez GitHub
commit bf99b93dae
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 13 dodań i 6 usunięć

Wyświetl plik

@ -31,13 +31,16 @@ def rstudio_base_scripts(r_version):
return [
(
"root",
# we should have --no-install-recommends on all our apt-get install commands,
# but here it's important because these recommend r-base,
# which will upgrade the installed version of R, undoing our pinned version
r"""
curl --silent --location --fail {rstudio_url} > /tmp/rstudio.deb && \
curl --silent --location --fail {shiny_server_url} > /tmp/shiny.deb && \
echo '{rstudio_sha256sum} /tmp/rstudio.deb' | sha256sum -c - && \
echo '{shiny_sha256sum} /tmp/shiny.deb' | sha256sum -c - && \
apt-get update > /dev/null && \
apt install -y /tmp/rstudio.deb /tmp/shiny.deb > /dev/null && \
apt install -y --no-install-recommends /tmp/rstudio.deb /tmp/shiny.deb && \
rm /tmp/rstudio.deb && \
apt-get -qq purge && \
apt-get -qq clean && \

Wyświetl plik

@ -38,8 +38,9 @@ class RBuildPack(PythonBuildPack):
- are needed by a specific tool
The `r-base` package from Ubuntu apt repositories is used to install
R itself, rather than any of the methods from https://cran.r-project.org/.
The `r-base-core` package from Ubuntu or "Ubuntu packages for R"
apt repositories is used to install R itself,
rather than any of the methods from https://cran.r-project.org/.
The `r-base-dev` package is installed as advised in RStudio instructions.
"""
@ -291,11 +292,14 @@ class RBuildPack(PythonBuildPack):
),
(
"root",
# we should have --no-install-recommends on all our apt-get install commands,
# but here it's important because it will pull in CRAN packages
# via r-recommends, which is only guaranteed to be compatible with the latest r-base-core
r"""
apt-get update > /dev/null && \
apt-get install --yes r-base={R_version} r-base-core={R_version} \
apt-get install --yes --no-install-recommends \
r-base-core={R_version} \
r-base-dev={R_version} \
r-recommended={R_version} \
libclang-dev \
libzmq3-dev > /dev/null && \
apt-get -qq purge && \

Wyświetl plik

@ -147,7 +147,7 @@ def test_custom_cran_apt_repo(tmpdir):
# check that we install the right package
for user, script in scripts:
if "r-base=3.5" in script:
if "r-base-core=3.5" in script:
break
else:
assert False, "Should have installed base R"