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

Don't redownload packages that are already on the repo #148

Open
ColinFay opened this issue May 16, 2022 · 2 comments
Open

Don't redownload packages that are already on the repo #148

ColinFay opened this issue May 16, 2022 · 2 comments
Labels

Comments

@ColinFay
Copy link

hey there,

When adding a package to a repo (or building it from a vector), it would be better if the function skipped the existing package. For example, adding {rlang} then {tidyr} will download {rlang} or {purrr} twice.
It's not an issue there with two packages, but when building large repo, it takes unnecessary time :) — some packages like stringi are 7.2mb for example.

> addPackage(
+   pkgs = "rlang",
+   mini_path
+ )
Created new folder: ./miniCRAN/src/contrib
trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/rlang_1.0.2.tar.gz'
Content type 'application/octet-stream' length 724829 bytes (707 KB)
==================================================
downloaded 707 KB

[...] # REMOVED

trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/jsonlite_1.8.0.tar.gz'
Content type 'application/octet-stream' length 1051625 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

[...] # REMOVED

trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/R6_2.5.1.tar.gz'
Content type 'application/octet-stream' length 63422 bytes (61 KB)
==================================================
downloaded 61 KB

[...] # REMOVED

trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/stringi_1.7.6.tar.gz'
Content type 'application/octet-stream' length 7600716 bytes (7.2 MB)
==================================================
downloaded 7.2 MB


[...] # REMOVED

trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/purrr_0.3.4.tar.gz'
Content type 'application/octet-stream' length 375062 bytes (366 KB)
==================================================
downloaded 366 KB

[...] # REMOVED
> addPackage(
+   pkgs = "tidyr",
+   mini_path
+ )
trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/tidyr_1.2.0.tar.gz'
Content type 'application/octet-stream' length 744570 bytes (727 KB)
==================================================
downloaded 727 KB

[...] # REMOVED

trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/purrr_0.3.4.tar.gz'
Content type 'application/octet-stream' length 375062 bytes (366 KB)
==================================================
downloaded 366 KB

trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/rlang_1.0.2.tar.gz'
Content type 'application/octet-stream' length 724829 bytes (707 KB)
==================================================
downloaded 707 KB

[...] # REMOVED

trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/R6_2.5.1.tar.gz'
Content type 'application/octet-stream' length 63422 bytes (61 KB)
==================================================
downloaded 61 KB

[...] # REMOVED

trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/jsonlite_1.8.0.tar.gz'
Content type 'application/octet-stream' length 1051625 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

[...] # REMOVED

trying URL 'https://cran.microsoft.com/snapshot/2022-04-01/src/contrib/stringi_1.7.6.tar.gz'
Content type 'application/octet-stream' length 7600716 bytes (7.2 MB)
==================================================
downloaded 7.2 MB

[...] # REMOVED

@andrie andrie added the Idea label Mar 24, 2024
@achubaty
Copy link
Collaborator

is this the same as #112 ?

@achubaty
Copy link
Collaborator

see also #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants