On 12/13/23 14:56, McGrath, Justin M wrote:
Thanks. Pursuing this a bit further, from ?tar "Known problems":
     > The handling of file paths of more than 100 bytes.  These
     > were unsupported in early versions of ‘tar’, and supported in
     > one way by POSIX ‘tar’ and in another by GNU ‘tar’ and yet
     > another by the POSIX ‘pax’ command which recent ‘tar’
     > programs often support.  The internal implementation warns on
     > paths of more than 100 bytes, uses the ‘ustar’ way from the
     > 1998 POSIX standard which supports up to 256 bytes (depending
     > on the path: in particular the final component is limited to
     > 100 bytes) if possible, otherwise the GNU way (which is
     > widely supported, including by ‘untar’).

R CMD check --as-cran gives a WARNING if a path is not ustar compatible, and 
gives the same message as a NOTE if it is not v7 compatible.

The path in the example below is ustar compatible, but not v7 compatible.

***********
* checking for portable file names ... NOTE
Found the following non-portable file path:
   
BioCro/inc/boost/numeric/odeint/stepper/generation/generation_controlled_adams_bashforth_moulton_really_long_file_name_one_two_three.hpp

Tarballs are only required to store paths of up to 100 bytes and cannot
store those of more than 256 bytes, with restrictions including to 100
bytes for the final component.
***********

The code is in library/tools/R/check.R. An equivalent test is performed by R 
CMD build in library/tools/utils/tar.R.

AFAIK, CRAN rejects a package regardless whether the message is given as a NOTE 
or a WARNING. ustar is 35 years old and is older than R itself, and thus anyone 
using R in the last several decades will have ustar support. Any path stored by 
ustar will be suitable for any common file system in use for the last several 
decades. Overall, if a path is supported by ustar, there is no reason to 
generate any message, even if that path is not v7 compatible. If the NOTE about 
v7 incompatibility is still desired, then could CRAN not reject packages for 
which the check reports a NOTE?

Please don't forget about what has been correctly mentioned on this thread already: there is essentially a 260 character limit on Windows (see https://blog.r-project.org/2023/03/07/path-length-limit-on-windows/index.html for more). Even if the relative path length limit for a CRAN package was no longer regarded important for tar compatibility, it would still make sense for compatibility with Windows. It may still be a good service to your users if you keep renaming the files to fit into that limit.

Also please do not share private emails on the list.

Thanks
Tomas


Best wishes,
Justin


_

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to