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_download downloads package twice #618

Open
gaborcsardi opened this issue Apr 23, 2024 · 1 comment
Open

pkg_download downloads package twice #618

gaborcsardi opened this issue Apr 23, 2024 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@gaborcsardi
Copy link
Member

options(repos=c(CRAN="https://packagemanager.posit.co/cran/latest"))
pk <- pak::pkg_download("assertthat@0.2.1", dest_dir = "pkgs")
system("find pkgs")
> system("find pkgs")
pkgs
pkgs/94f6afe-assertthat_0.2.1.tar.gz-ok
pkgs/94f6afe-assertthat_0.2.1.tar.gz-t
pkgs/94f6afe-assertthat_0.2.1.tar.gz-t/assertthat
pkgs/94f6afe-assertthat_0.2.1.tar.gz-t/assertthat/man
pkgs/94f6afe-assertthat_0.2.1.tar.gz-t/assertthat/man/has_args.Rd
...
pkgs/src
pkgs/src/contrib
pkgs/src/contrib/assertthat_0.2.1-43b6c55f93.tar.gz
pkgs/src/contrib/assertthat_0.2.1.tar.gz.tmp.2
pkgs/src/contrib/assertthat_0.2.1.tar.gz
pkgs/94f6afe-assertthat_0.2.1.tar.gz
@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Apr 23, 2024
@michaelmayer2
Copy link

This is even more worrying but hopefully addressed by this bug, too - If I am trying to download an archived package, it will both download the archived package and the latest !

> pk<-pak::pkg_download("assertthat@0.2.1")
ℹ Getting 1 pkg (12.74 kB), 1 cached                                       
✔ Cached copy of assertthat 0.2.1 (source) is the latest build
✔ Got assertthat 0.2.1 (source) (12.61 kB)                                 
✔ Downloaded 1 package (12.61 kB) in 161ms                                 
> pk$fulltarget
[1] "./src/contrib/assertthat_0.2.1-59789cf3a2.tar.gz" "./src/contrib/assertthat_0.2.1.tar.gz"           
> pk<-pak::pkg_download("assertthat@0.2.0")
ℹ Getting 1 pkg (12.74 kB), 1 cached                                       
✔ Cached copy of assertthat 0.2.1 (source) is the latest build
✔ Got assertthat 0.2.0 (source) (11.44 kB)                                 
✔ Downloaded 1 package (11.44 kB) in 192ms                                 
> pk$fulltarget
[1] "./src/contrib/assertthat_0.2.0-7c1275a82d.tar.gz" "./src/contrib/assertthat_0.2.1.tar.gz"  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants