-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Library.site
is not defined in archlinux
#73
Comments
Thanks for the report!
It's not that simple, because we specifically want to exclude the user library there. We really want unique(c(.Library.site, .Library)) Could you please check what's the output of this for you? |
That seems to work: .Library.site
#> character(0)
.Library
#> [1] "/usr/lib64/R/library"
unique(c(.Library.site, .Library))
#> [1] "/usr/lib64/R/library" Created on 2023-07-13 with reprex v2.0.2 Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.3.1 (2023-06-16)
#> os Garuda Linux
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz America/Lima
#> date 2023-07-13
#> pandoc 3.1.2 @ /usr/lib/rstudio/bin/quarto/bin/tools/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> cli 3.6.1 2023-03-23 [2] CRAN (R 4.3.0)
#> digest 0.6.33 2023-07-07 [1] CRAN (R 4.3.1)
#> evaluate 0.21 2023-05-05 [2] CRAN (R 4.3.0)
#> fastmap 1.1.1 2023-02-24 [2] CRAN (R 4.3.1)
#> fs 1.6.2 2023-04-25 [2] CRAN (R 4.3.1)
#> glue 1.6.2 2022-02-24 [2] CRAN (R 4.3.0)
#> htmltools 0.5.5 2023-03-23 [2] CRAN (R 4.3.1)
#> knitr 1.43 2023-05-25 [2] CRAN (R 4.3.1)
#> lifecycle 1.0.3 2022-10-07 [2] CRAN (R 4.3.0)
#> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.3.0)
#> purrr 1.0.1 2023-01-10 [2] CRAN (R 4.3.0)
#> R.cache 0.16.0 2022-07-21 [2] CRAN (R 4.3.0)
#> R.methodsS3 1.8.2 2022-06-13 [2] CRAN (R 4.3.0)
#> R.oo 1.25.0 2022-06-12 [2] CRAN (R 4.3.0)
#> R.utils 2.12.2 2022-11-11 [2] CRAN (R 4.3.0)
#> reprex 2.0.2 2022-08-17 [2] CRAN (R 4.3.1)
#> rlang 1.1.1 2023-04-28 [2] CRAN (R 4.3.0)
#> rmarkdown 2.23 2023-07-01 [2] CRAN (R 4.3.1)
#> rstudioapi 0.15.0 2023-07-07 [2] CRAN (R 4.3.1)
#> sessioninfo 1.2.2 2021-12-06 [2] CRAN (R 4.3.0)
#> styler 1.10.1 2023-06-05 [2] CRAN (R 4.3.0)
#> vctrs 0.6.3 2023-06-14 [2] CRAN (R 4.3.0)
#> withr 2.5.0 2022-03-03 [2] CRAN (R 4.3.0)
#> xfun 0.39 2023-04-20 [2] CRAN (R 4.3.0)
#> yaml 2.3.7 2023-01-23 [2] CRAN (R 4.3.0)
#>
#> [1] /home/brian/R/x86_64-pc-linux-gnu-library/4.3
#> [2] /usr/lib/R/library
#>
#> ────────────────────────────────────────────────────────────────────────────── |
I was using the package from archlinux, but there was something that didn't make sense to me and that is that every time I installed a new package, all its dependencies were reinstalled even though they were already installed in the system. Then I tried it on a docker with ubuntu with R installed and this didn't happen.
Actually, in archlinux this happens when I tried to install
ggmosaic
for example:Output
Created on 2023-07-13 with reprex v2.0.2
And this happens because inside the
pkg_deps
function,.Library.site
is used to check the packages that are installed on the system:https://github.com/Enchufa2/bspm/blob/10d2f4a941ddd3f5dcc61cd58af5be91267474c1/R/utils.R#L59
Inside of:
https://github.com/Enchufa2/bspm/blob/10d2f4a941ddd3f5dcc61cd58af5be91267474c1/R/utils.R#L57-L76
And although in Ubuntu I see that this contains information, in archlinux this is not so.
Created on 2023-07-13 with reprex v2.0.2
It seems to me that this could be easily solved by using
.libPaths()
instead of.Library.site
:Created on 2023-07-13 with reprex v2.0.2
When I modify the function:
Created on 2023-07-13 with reprex v2.0.2
The installation is given directly to the package of interest if the rest of the dependencies are already installed:
Created on 2023-07-13 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: