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

Recognize linux binaries vs. build from source #572

Open
colearendt opened this issue Aug 12, 2019 · 7 comments
Open

Recognize linux binaries vs. build from source #572

colearendt opened this issue Aug 12, 2019 · 7 comments

Comments

@colearendt
Copy link
Contributor

Related to #570

Packrat currently does not understand linux binaries. As a result, we get a log like this on restore:

 amazon-ebs: 2019/08/12 14:09:31.453089304 Installing yaml (2.2.0) ...
    amazon-ebs: 2019/08/12 14:09:47.593115789 Caching yaml.
    amazon-ebs: 2019/08/12 14:09:47.597138701 Using cached yaml.
    amazon-ebs: 2019/08/12 14:09:47.597983490     OK (built source)
    amazon-ebs: 2019/08/12 14:09:47.598177764 Installing zeallot (0.1.0) ...
    amazon-ebs: 2019/08/12 14:10:00.335288842 Caching zeallot.
    amazon-ebs: 2019/08/12 14:10:00.346547524 Using cached zeallot.
    amazon-ebs: 2019/08/12 14:10:00.347476409     OK (built source)
    amazon-ebs: 2019/08/12 14:10:00.347727926 Installing RPostgreSQL (0.6-2) ...
    amazon-ebs: 2019/08/12 14:10:16.088400015 Caching RPostgreSQL.
    amazon-ebs: 2019/08/12 14:10:16.095286524 Using cached RPostgreSQL.
    amazon-ebs: 2019/08/12 14:10:16.096622210     OK (built source)
    amazon-ebs: 2019/08/12 14:10:16.096810137 Installing stopwords (1.0) ...
    amazon-ebs: 2019/08/12 14:10:29.048044045 Caching stopwords.
    amazon-ebs: 2019/08/12 14:10:29.051622071 Using cached stopwords.
    amazon-ebs: 2019/08/12 14:10:29.052456560     OK (built source)
    amazon-ebs: 2019/08/12 14:10:29.052641092 Installing class (7.3-14) ...
    amazon-ebs: 2019/08/12 14:10:30.355236716 Caching class.
    amazon-ebs: 2019/08/12 14:10:30.360291650 Using cached class.
    amazon-ebs: 2019/08/12 14:10:30.361229469     OK (built source)

This is strange b/c packrat recognizes the binary and caches it / uses the cache. However, it also thinks that it built source. If it is possible to say something like using binary - install.packages(), at least, recognizes this difference.

@kevinushey
Copy link
Contributor

This is because Packrat infers that .tar.gz extension => source package (which is true by normal conventions). We'll have to detect whether the package is binary or source based on the files / layout of files in the archive to solve this.

@kevinushey
Copy link
Contributor

I believe this is now properly handled: https://github.com/rstudio/renv/blob/d368c290d43f45e992b658b5f30a7baa9845e80b/R/install.R#L165-L169

@scottmmjackson
Copy link

We're still encountering (built source) on Linux binary restores in Connect.

I've verified that the packages we're getting contain a Meta directory which according to https://github.com/rstudio/renv/blob/d368c290d43f45e992b658b5f30a7baa9845e80b/R/packages.R#L46 should be flagging them as binary. Not sure why that isn't happening. We're using the latest hash of packrat.

@scottmmjackson
Copy link

Is it because tar.gz needs to be one of the methods here?

@aronatkins
Copy link
Contributor

@kevinushey Your code reference prior to closing was in renv not in packrat; intentional?

@kevinushey
Copy link
Contributor

It was not. Evidently I fixed the issue in renv but not Packrat.

@kevinushey kevinushey reopened this Nov 14, 2019
kevinushey added a commit that referenced this issue Nov 14, 2019
@kevinushey
Copy link
Contributor

Associated fix ported to Packrat via 448aafd.

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

4 participants