Skip to content

pkgbuild can now avoid copying large package trees - #150

Merged
gaborcsardi merged 1 commit into
mainfrom
feature/no-copy
Nov 25, 2022
Merged

gaborcsardi merged 1 commit into
mainfrom
feature/no-copy

Conversation

@gaborcsardi

@gaborcsardi gaborcsardi commented Nov 25, 2022 •

Copy link
Copy Markdown
Member

This is currently an opt-in feature, and you need to set the PKG_BUILD_COPY_METHOD=link environment variable ot turn it on. It can also be configured via an option or a DESCRIPTION entry. See ?build or README.md.

Closes #59.

This is currently an opt-in feature, and you need
to set the `PKG_BUILD_COPY_METHOD=link` environment
variable ot turn it on. It can also be configured
via an option or a `DESCRIPTION` entry. See
`?build` or `README.md`.

Closes #59.
@krlmlr

krlmlr commented Nov 25, 2022

Copy link
Copy Markdown
Member

Thanks. I wonder why this has proven to be that complicated.

In some cases like duckdb, arrow, r-igraph, we might need the parent directory to be present during R CMD build . . Looks like this is incompatible with the new option.

I'll try the next time I have a package directory with a lot of detritus.

@gaborcsardi

Copy link
Copy Markdown
Member Author

In some cases like duckdb, arrow, r-igraph, we might need the parent directory to be present during R CMD build . . Looks like this is incompatible with the new option.

I am not sure how this is possible. pkgbuild::build() just runs R CMD build, which also starts by copying and trimming the package directory. pkgbuild does the same, except that it does not copy stuff that would be deleted immediately, anyway. So if it works with R CMD build, it should work with pkgbuild::build(). (FWIW it works fine for igraph, I just tried.)

@gaborcsardi
gaborcsardi merged commit ebc654f into main Nov 25, 2022
@gaborcsardi
gaborcsardi deleted the feature/no-copy branch November 25, 2022 18:58
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

Successfully merging this pull request may close these issues.

Can we somehow avoid copying large directories that will not be in the package?

2 participants