Skip to content

download.packages may not download the expected file name #731

@aronatkins

Description

@aronatkins
cap <- available.packages(contriburl = contrib.url(repos = "https://cran.rstudio.com"))
cap["xgboost", "File"]
#> [1] NA

ap <- available.packages(contriburl = contrib.url(repos = "https://dmlc.r-universe.dev"))
ap["xgboost", "File"]
#> [1] "sha256-3dd58bf76501d07cb6cc989a42fa398a976ff7be16e1c32dc1e436f80aff16af"
download.packages("xgboost", "/tmp", repos = "https://cran.rstudio.com")
#> trying URL 'https://cran.rstudio.com/src/contrib/xgboost_1.7.11.1.tar.gz'
#> Content type 'application/x-gzip' length 1085939 bytes (1.0 MB)
#> ==================================================
#> downloaded 1.0 MB
#> 
#>      [,1]      [,2]                          
#> [1,] "xgboost" "/tmp/xgboost_1.7.11.1.tar.gz"

download.packages("xgboost", "/tmp", repos = "https://dmlc.r-universe.dev")
#> trying URL 'https://dmlc.r-universe.dev/src/contrib/sha256-3dd58bf76501d07cb6cc989a42fa398a976ff7be16e1c32dc1e436f80aff16af'
#> Content type 'application/gzip' length 1654034 bytes (1.6 MB)
#> ==================================================
#> downloaded 1.6 MB
#> 
#>      [,1]      [,2]                                                                          
#> [1,] "xgboost" "/tmp/sha256-3dd58bf76501d07cb6cc989a42fa398a976ff7be16e1c32dc1e436f80aff16af"

This presents problems for Packrat because it assumes that the downloaded file is if the shape xgboost_3.0.2.1.tar.gz.

It has some allowance for a file not in the destination directory (packrat/src), but not when it has a different file name.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions