previously downloaded source is seen as "untrusted"
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
This issue is visible both with 5bbb95babaa308ddb0b4eac29e8e89e1687f8014 and 29b1c491b8f90aab40077d011d0077d81a99d7d4.
Given the packrat.lock:
packrat.lock.txt
And the following code to restore packages (restore.R):
library(packrat)
# Let Packrat know that RStudio Connect is about to deploy.
Sys.setenv(RSTUDIO_CONNECT = 1)
Sys.setenv(MAKEFLAGS = "-j2")
# Set R options. We use 'curl' primarily because it's the best-supported
# downloader with packrat; we also force curl to follow redirects (just in
# case Packrat doesn't do it on its own).
options(
download.file.method = "curl",
download.file.extra = "-L -f"
)
Sys.umask(mode = "0027")
packratCacheDir <- file.path("cache", getRversion())
dir.create(packratCacheDir, recursive = TRUE)
options(packrat.verbose.cache = TRUE,
packrat.connect.timeout = 10)
opts <- list(
auto.snapshot = FALSE,
use.cache = TRUE,
project = getwd(),
persist = FALSE
)
do.call(packrat::set_opts, opts)
Sys.setenv(R_PACKRAT_CACHE_DIR = packratCacheDir)
packrat::restore(
overwrite.dirty = TRUE,
prompt = FALSE,
restart = FALSE)
Take the following steps:
$ R --no-save --slave -f restore.R
$ rm -rf cache packrat/lib
$ R --no-save --slave -f restore.R
The cache/3.2.4/v2/ directory contains both library and library-client sub-directories. Some of the packrat/lib links are into the library while others are into library-client.
The packages that have downloads remaining in packrat/src after the first restore are the ones installed into library-client.
$ ls packrat/src
Rcpp digest formatR jsonlite markdown stringi tibble
assertthat evaluate htmltools knitr rmarkdown stringr yaml
$ readlink packrat/lib/x86_64-apple-darwin13.4.0/3.2.4/*
cache/3.2.4/v2/library-client/Rcpp/110bf62255de9fb992405147761de63f/Rcpp
cache/3.2.4/v2/library-client/assertthat/59f9d7f7c00077ea54d763b78eeb5798/assertthat
cache/3.2.4/v2/library/base64enc/c590d29e555926af053055e23ee79efb/base64enc
cache/3.2.4/v2/library/bitops/67d0775189fd0041d95abca618c5c07e/bitops
cache/3.2.4/v2/library/caTools/97cb6f6293cd18d17df77a6383cc6763/caTools
cache/3.2.4/v2/library-client/digest/47d19499e89d3bd3e2c2c20ff3f33001/digest
cache/3.2.4/v2/library-client/evaluate/877d89ce8a9ef7f403b1089ca1021775/evaluate
cache/3.2.4/v2/library-client/formatR/98b9b64b2785b35f9df403e1aab6c73c/formatR
cache/3.2.4/v2/library/highr/aa3d5b7912b5fed4b546ed5cd2a1760b/highr
cache/3.2.4/v2/library-client/htmltools/5f001aff4a39e329f7342dcec5139724/htmltools
cache/3.2.4/v2/library-client/jsonlite/089caeead83414a4467bae0795638005/jsonlite
cache/3.2.4/v2/library-client/knitr/ef0fbeaa9372f99ffbc57212a7781511/knitr
cache/3.2.4/v2/library/lazyeval/3d6e7608e65bbf5cb170dab1e3c9ed8b/lazyeval
cache/3.2.4/v2/library/magrittr/bdc4d48c3135e8f3b399536ddf160df4/magrittr
cache/3.2.4/v2/library-client/markdown/72deca9c675c7cc9343048edbc29f7ff/markdown
cache/3.2.4/v2/library/mime/463550cf44fb6f0a2359368f42eebe62/mime
cache/3.2.4/v2/library/packrat/6ad605ba7b4b476d84be6632393f5765/packrat
cache/3.2.4/v2/library-client/stringi/32b919ee3fa8474530c4942962a6d8d9/stringi
cache/3.2.4/v2/library-client/stringr/47973a33944c6d5db9524b1e835b8a5d/stringr
cache/3.2.4/v2/library-client/tibble/bdbc3d67aa16860741add6d6ec20ea13/tibble
cache/3.2.4/v2/library-client/yaml/f2203ea395adaff6bd09134666191d9a/yaml
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running restore.R with the supplied packrat.lock and reproducing the two restore commands. Inspect how the cache/3.2.4/v2/library and library-client directories are selected, and how links under packrat/lib and remaining packages under packrat/src are handled. Done means previously downloaded sources are no longer treated as untrusted during restore.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100