Skip to content

Commit 19acf46

Browse files
committed
remove r-recommended package
r-recommended is a collection of common CRAN packages, which cause conflicts when trying to install older R. These same packages can be regular dependencies retrieved from CRAN.
1 parent a37a205 commit 19acf46

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

repo2docker/buildpacks/_r_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def rstudio_base_scripts(r_version):
3737
echo '{rstudio_sha256sum} /tmp/rstudio.deb' | sha256sum -c - && \
3838
echo '{shiny_sha256sum} /tmp/shiny.deb' | sha256sum -c - && \
3939
apt-get update > /dev/null && \
40-
apt install -y /tmp/rstudio.deb /tmp/shiny.deb > /dev/null && \
40+
apt install -y --no-install-recommends /tmp/rstudio.deb /tmp/shiny.deb && \
4141
rm /tmp/rstudio.deb && \
4242
apt-get -qq purge && \
4343
apt-get -qq clean && \

repo2docker/buildpacks/r.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ class RBuildPack(PythonBuildPack):
3838
3939
- are needed by a specific tool
4040
41-
The `r-base` package from Ubuntu apt repositories is used to install
42-
R itself, rather than any of the methods from https://cran.r-project.org/.
41+
The `r-base-core` package from Ubuntu or "Ubuntu packages for R"
42+
apt repositories is used to install R itself,
43+
rather than any of the methods from https://cran.r-project.org/.
4344
4445
The `r-base-dev` package is installed as advised in RStudio instructions.
4546
"""
@@ -293,9 +294,9 @@ def get_build_scripts(self):
293294
"root",
294295
r"""
295296
apt-get update > /dev/null && \
296-
apt-get install --yes r-base={R_version} r-base-core={R_version} \
297+
apt-get install --yes --no-install-recommends \
298+
r-base-core={R_version} \
297299
r-base-dev={R_version} \
298-
r-recommended={R_version} \
299300
libclang-dev \
300301
libzmq3-dev > /dev/null && \
301302
apt-get -qq purge && \

tests/unit/test_r.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_custom_cran_apt_repo(tmpdir):
147147

148148
# check that we install the right package
149149
for user, script in scripts:
150-
if "r-base=3.5" in script:
150+
if "r-base-core=3.5" in script:
151151
break
152152
else:
153153
assert False, "Should have installed base R"

0 commit comments

Comments
 (0)