[R-pkg-devel] Order of repo access from options("repos")

Kevin Ushey kev|nu@hey @end|ng |rom gm@||@com
Sun Mar 31 20:40:07 CEST 2024


It may also be useful to use:

    options(internet.info = 1)

to get more information on the web requests R is making. (See the
documentation in ?options for more details.)

Looking at the source code in available.packages, R does iterate
through the repositories in the same order they're provided, so I'd
suspect some kind of other issue. (Output somehow getting misordered
in your build logs? Repository options being unexpectedly reordered in
your CI build somewhere?)

FWIW, I think the order that repositories are visited could matter if
the same package is offered by multiple repositories -- the selected
repository could depend on the order of declaration.

Best,
Kevin

On Sun, Mar 31, 2024 at 4:55 AM Dirk Eddelbuettel <edd using debian.org> wrote:
>
>
> On 31 March 2024 at 11:43, Martin Morgan wrote:
> | So all repositories are consulted and then the result filtered to contain just
> | the most recent version of each. Does it matter then what order the
> | repositories are visited?
>
> Right. I fall for that too often, as I did here.  The order matters for
> .libPaths() where the first match is use, for package install the highest
> number (from any entry in getOption(repos)) wins.
>
> Thanks for catching my thinko.
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list