Skip to content

Commit

Permalink
update documentation of binary package types
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87323 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
urbaneks committed Nov 12, 2024
1 parent c9437a8 commit 2753df3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 18 deletions.
23 changes: 13 additions & 10 deletions doc/manual/R-admin.texi
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ sources on Windows without any additional tools.
@subsection macOS

On macOS @code{install.packages} works as it does on other Unix-alike
systems, but there is an additional type @code{mac.binary} (available
systems, but there is an additional type @code{binary} (available
for the @acronym{CRAN} distribution but not when compiling @R{} from
source) which can be passed to @code{install.packages} in order to
download and install binary packages from a suitable repository. These
Expand Down Expand Up @@ -2536,15 +2536,18 @@ wise to have a @file{src/contrib} area with a possibly empty
@file{PACKAGES} file.

@item
@code{"win.binary"}: located at @file{bin/windows/contrib/@var{x.y}} for
@R{} versions @var{x.y.z} and containing @file{.zip} files for Windows.

@item
@code{"mac.binary"}: located at
@file{bin/macosx/big-sur-arm64/contrib/@var{4.y}} or
@file{bin/macosx/big-sur-x86_64/contrib/@var{4.y}} for the @acronym{CRAN}
builds for macOS for @R{} versions @var{4.y.z}, containing @file{.tgz}
files. (@file{bin/macosx/contrib/@var{4.y}} for @code{@var{y}} = 0, 1 or 2.)
@code{"binary"}: binary packages are located under
@file{bin/@var{os}/@var{build}/contrib/@var{x.y}} for @R{} versions
@var{x.y.z}, where @var{os} is either @file{windows} for Windows or
@file{macosx} for macOS and OS X. The @var{build} variable is defined
by the third part of the @code{type} value after @code{binary} and
may be empty. For example, in @R{} 4.4.1
@code{"mac.binary.big-sur-arm64"} specifies the
@file{bin/macosx/big-sur-arm64/4.4} location, while
@code{"win.binary"} specifies @file{bin/windows/contrib/4.4}. The
platform and build specification in @acronym{CRAN} @R{} binaries can
be obtained from @code{.Platform$pkgType}. Windows binary package
files use @file{.zip} extension while Mac files use @file{.tgz}.
@end itemize

Each terminal directory must also contain a @file{PACKAGES} file. This
Expand Down
7 changes: 3 additions & 4 deletions src/library/base/man/options.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,10 @@ getOption(x, default = NULL)
\code{"win.binary"}, \code{"source"} and
\code{"both"} (the default).}
\item{on Unix-alikes}{\code{"source"} (the default except under a
CRAN macOS build), \code{"mac.binary"} and
CRAN macOS build), build-specific variants of
\code{"mac.binary"} (e.g., \code{"mac.binary.big-sur-arm64"}) or
\code{"both"} (the default for CRAN macOS builds).
(\code{"mac.binary.el-capitan"},
\code{"mac.binary.mavericks"}, \code{"mac.binary.leopard"}
and \code{"mac.binary.universal"} are no longer in use.)}
}
}
Value \code{"binary"} is a synonym for the native binary type (if
there is one); \code{"both"} is used by
Expand Down
17 changes: 13 additions & 4 deletions src/library/utils/man/install.packages.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,19 @@ install.packages(pkgs, lib, repos = getOption("repos"),
CRAN builds for macOS. This function can install either type, either by
downloading a file from a repository or from a local file.

Possible values of \code{type} are (currently) \code{"source"},
\code{"mac.binary"}, and
\code{"win.binary"}: the appropriate binary type where supported can
also be selected as \code{"binary"}.
Possible values of \code{type} for binary packages are either simply
\code{"binary"} to denote the binaries matching the current R, or
a string consisting of two or three parts separated by periods: the
operating system (\code{"win"} or \code{"mac"}), the string
\code{"binary"} and optional build name (e.g., \code{"big-sur-arm64"}).
The last part is optional and currently only used on macOS to
disambiguate builds targetting different macOS versions or
architectures. Example values:
\code{"win.binary"} for Windows binaries and
\code{"mac.binary.big-sur-arm64"} for macOS 11 (Big Sur) arm64 binaries.
The corresponding binary type for the running R can be obtained via
\code{.Platform$pkgType}, however, it may be \code{"source"} if
the build does not support package binaries.

For a binary install from a repository, the function checks for the
availability of a source package on the same repository, and reports
Expand Down

0 comments on commit 2753df3

Please sign in to comment.