Closed surmann closed 6 years ago
Seems like utils::untar()
returns NULL
? It should not do that, according to the docs, and AFAICT the version on my R 3.5.1 does not. What is your R version?
The output of Sys.getenv("TAR")
would be useful as well
I use R 3.5.1.
The result of utils::untar("file.tar")
is 0
not NULL
. However, no files are extracted.
Sys.getenv("TAR")
gives me ""
.
Oh, of course, system()
runs tar
with intern = TRUE
, so we'll have to look at the status
attribute of the result.
Do you need here something from my side?
If you could try this, that would help: https://github.com/r-lib/remotes/pull/172
You can install it with
remotes::install_github("r-lib/remotes#172")
Or, if remotes fails on this as well, then like this:
source("https://raw.githubusercontent.com/r-lib/remotes/master/install-github.R")$value("r-lib/remotes#172")
We are one step further. I am on ac44630
. This is the output now:
* DONE (package)
tar.exe: Option --force-local is not supported
Usage:
List: tar.exe -tf <archive-filename>
Extract: tar.exe -xf <archive-filename>
Create: tar.exe -cf <archive-filename> [filenames...]
Help: tar.exe --help
External tar failed with `--force-local`, trying without
tar.exe: Option --force-local is not supported
Usage:
List: tar.exe -tf <archive-filename>
Extract: tar.exe -xf <archive-filename>
Create: tar.exe -cf <archive-filename> [filenames...]
Help: tar.exe --help
External tar failed with `--force-local`, trying without
Package 'package' has been installed to 'C:/Users/name/Documents/RPackages'
Warning messages:
1: In system(cmd, intern = TRUE) :
running command 'tar.exe -ztf "C:\Users\name\AppData\Local\Temp\RtmpkR0eif\file3504243b42eb\package_0.1.0-9000.tar.gz" --force-local' had status 1
2: In utils::untar(tarfile, extras = "--force-local", ...) :
'tar.exe -zxf "C:\Users\name\AppData\Local\Temp\RtmpkR0eif\file3504243b42eb\package_0.1.0-9000.tar.gz" -C "C:/Users/name/AppData/Local/Temp/RtmpkR0eif/file350458df56e8" --force-local "package/DESCRIPTION"' returned error code 1
Yeah, I think this means that the package was successfully installed, and everything works properly. We should still clean up the output from the failed tar
calls, I'll do that in a minute.
OK, can you pls. try again?
I use
remotes * 1.1.1.9000 2018-09-27 Github (r-lib/remotes@54146c0)
> remotes::install_local(force = TRUE)
gives me
* DONE (package)
tar.exe: Option --force-local is not supported
Usage:
List: tar.exe -tf <archive-filename>
Extract: tar.exe -xf <archive-filename>
Create: tar.exe -cf <archive-filename> [filenames...]
Help: tar.exe --help
External tar failed with `--force-local`, trying without
tar.exe: Option --force-local is not supported
Usage:
List: tar.exe -tf <archive-filename>
Extract: tar.exe -xf <archive-filename>
Create: tar.exe -cf <archive-filename> [filenames...]
Help: tar.exe --help
External tar failed with `--force-local`, trying without
Hmmm, it seems like suppressing that output is a bit more tricky. But I assume the installation worked properly otherwise?
Yes.
However, why do you send an option to tar.exe
which is not supported? Is is possible to skip this option instead of suppressing the errors?
Because many tar programs do support it, and they behave better with this option. So we first try with the option, and if it does not work we fall back. The fall back now works properly with #172, but unfortunately it is hard to suppress the error message for the first try.
We could add an option for this, but in general it is better to avoid options, whenever it is possible to have a sane behavior on all systems.
Ok, thanks!
When I use
remotes::install_local(force = TRUE)
, because of "Skipping install of '...' from a local remote, the SHA1 (0.1.0-90) has not changed since last install." I get the errortar.exe: Option --force-local is not supported
. I use a Windows 10 system.Here is the complete output after the "DONE" statement:
Do you have an idea?