Skip to content

Commit 2753df3

Browse files
author
urbaneks
committed
update documentation of binary package types
git-svn-id: https://svn.r-project.org/R/trunk@87323 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent c9437a8 commit 2753df3

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

doc/manual/R-admin.texi

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ sources on Windows without any additional tools.
21142114
@subsection macOS
21152115

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

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

25502553
Each terminal directory must also contain a @file{PACKAGES} file. This

src/library/base/man/options.Rd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,10 @@ getOption(x, default = NULL)
748748
\code{"win.binary"}, \code{"source"} and
749749
\code{"both"} (the default).}
750750
\item{on Unix-alikes}{\code{"source"} (the default except under a
751-
CRAN macOS build), \code{"mac.binary"} and
751+
CRAN macOS build), build-specific variants of
752+
\code{"mac.binary"} (e.g., \code{"mac.binary.big-sur-arm64"}) or
752753
\code{"both"} (the default for CRAN macOS builds).
753-
(\code{"mac.binary.el-capitan"},
754-
\code{"mac.binary.mavericks"}, \code{"mac.binary.leopard"}
755-
and \code{"mac.binary.universal"} are no longer in use.)}
754+
}
756755
}
757756
Value \code{"binary"} is a synonym for the native binary type (if
758757
there is one); \code{"both"} is used by

src/library/utils/man/install.packages.Rd

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,19 @@ install.packages(pkgs, lib, repos = getOption("repos"),
221221
CRAN builds for macOS. This function can install either type, either by
222222
downloading a file from a repository or from a local file.
223223

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

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

0 commit comments

Comments
 (0)