Skip to content
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

pkg_install(dependencies = FALSE) does not sequence package installation #706

Open
kevinushey opened this issue Oct 11, 2024 · 0 comments
Open

Comments

@kevinushey
Copy link

kevinushey commented Oct 11, 2024

Originally from rstudio/renv#1883.


It seems like pak does not perform sequencing of package installation when dependencies = FALSE. For example:

lib <- tempfile()
dir.create(lib)
.libPaths(lib)

install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))

pkgs <- unlist(tools::package_dependencies("rmarkdown", recursive = TRUE))
pkgs <- paste0(pkgs, "?source&nocache")

pak::pkg_install(
   pkg = pkgs,
   dependencies = FALSE
)

When I tried this, installation failed with:

> pak::pkg_install(
+    pkg = pkgs,
+    dependencies = FALSE
+ )
✔ Loading metadata database ... doneWill install 25 packages.Will download 25 CRAN packages (15.27 MB).
+ base64enc     0.1-3   👷🏽‍♂️🔧 ⬇ (7.83 kB)
+ bslib         0.8.0   👷🏽‍♀️ ⬇ (5.14 MB)
+ cachem        1.1.0   👷🏽🔧 ⬇ (27.19 kB)
+ cli           3.6.3   👷🏿‍♂️🔧 ⬇ (568.16 kB)
+ digest        0.6.37  👷🏼‍♀️🔧 ⬇ (232.31 kB)
+ evaluate      1.0.1   👷🏽‍♂️ ⬇ (34.87 kB)
+ fastmap       1.2.0   👷🏻‍♀️🔧 ⬇ (46.71 kB)
+ fontawesome   0.5.2   👷 ⬇ (1.28 MB)
+ fs            1.6.4   👷‍♀️🔧 ⬇ (1.20 MB)
+ glue          1.8.0   👷🏽‍♀️🔧 ⬇ (126.68 kB)
+ highr         0.11    👷🏿 ⬇ (13.85 kB)
+ htmltools     0.5.8.1 👷🏾🔧 ⬇ (135.13 kB)
+ jquerylib     0.1.4   👷 ⬇ (520.21 kB)
+ jsonlite      1.8.9   👷🏽🔧 ⬇ (1.06 MB)
+ knitr         1.48    👷🏻‍♀️ ⬇ (583.01 kB)
+ lifecycle     1.0.4   👷‍♀️ ⬇ (107.66 kB)
+ memoise       2.0.1   👷🏿‍♀️ ⬇ (17.85 kB)
+ mime          0.12    👷🏼🔧 ⬇ (12.56 kB)
+ R6            2.5.1   👷🏼‍♀️ ⬇ (63.42 kB)
+ rappdirs      0.3.3   👷🏼‍♀️🔧 ⬇ (12.29 kB)
+ rlang         1.1.4   👷🏿‍♀️🔧 ⬇ (767.04 kB)
+ sass          0.4.9   👷🏻‍♀️🔧 ⬇ (3.03 MB)
+ tinytex       0.53    👷‍♂️ ⬇ (35.25 kB)
+ xfun          0.48    👷🏽‍♂️🔧 ⬇ (164.96 kB)
+ yaml          2.3.10  👷🏿‍♀️🔧 ⬇ (94.56 kB)
ℹ Getting 25 pkgs (15.27 MB)
✔ Got evaluate 1.0.1 (source) (34.87 kB)                                                                                        
✔ Got knitr 1.48 (source) (583.01 kB)                                                                                           
✔ Got fontawesome 0.5.2 (source) (1.28 MB)                                                                                      
✔ Got xfun 0.48 (source) (164.96 kB)                                                                                            
✔ Got cachem 1.1.0 (source) (27.19 kB)                                                                                          
✔ Got lifecycle 1.0.4 (source) (107.66 kB)                                                                                         
✔ Got glue 1.8.0 (source) (126.68 kB)                                                                                              
✔ Got R6 2.5.1 (source) (63.42 kB)                                                                                                 
✔ Got base64enc 0.1-3 (source) (7.83 kB)                                                                                           
✔ Got jsonlite 1.8.9 (source) (1.06 MB)                                                                                            
✔ Got mime 0.12 (source) (12.56 kB)                                                                                                
✔ Got bslib 0.8.0 (source) (5.14 MB)                                                                                               
✔ Got sass 0.4.9 (source) (3.03 MB)                                                                                                
✔ Got digest 0.6.37 (source) (232.31 kB)                                                                                           
✔ Got fastmap 1.2.0 (source) (46.71 kB)                                                                                            
✔ Got cli 3.6.3 (source) (568.16 kB)                                                                                               
✔ Got htmltools 0.5.8.1 (source) (135.13 kB)                                                                                       
✔ Got jquerylib 0.1.4 (source) (520.21 kB)                                                                                         
✔ Got memoise 2.0.1 (source) (17.85 kB)                                                                                            
✔ Got rappdirs 0.3.3 (source) (12.29 kB)                                                                                           
✔ Got tinytex 0.53 (source) (35.25 kB)                                                                                             
✔ Got fs 1.6.4 (source) (1.20 MB)                                                                                                  
✔ Got yaml 2.3.10 (source) (94.56 kB)                                                                                              
✔ Got rlang 1.1.4 (source) (767.04 kB)                                                                                             
✔ Got highr 0.11 (source) (13.85 kB)                                                                                               
✔ Downloaded 25 packages (15.27 MB) in 890msBuilding bslib 0.8.0Building evaluate 1.0.1Building fontawesome 0.5.2Building htmltools 0.5.8.1Building jquerylib 0.1.4Building jsonlite 1.8.9Building knitr 1.48Building tinytex 0.53Building xfun 0.48Building yaml 2.3.10Failed to build fontawesome 0.5.2 (505ms)       
Error:                                            
! error in pak subprocess
Caused by error in `stop_task_build(state, worker)`:
! Failed to build source package fontawesome.
Type .Last.error to see the more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant