Dirk,
Sadly I can't use localhost for all of those.  172.17.0.1 is an internal
Docker IP, not the localhost address (127.0.0.1), they are there to handle
two different scenarios and different ones will fail to resolve in
different scenarios.  Are you saying that the DNS lookup adds a timing
issue to the search order?  Isn't the list deterministically ordered?


Greg

On Sun, 31 Mar 2024 at 22:15, Dirk Eddelbuettel <e...@debian.org> wrote:

>
> Greg,
>
> There are AFAICT two issues here: how R unrolls the named vector that is
> the
> 'repos' element in the list 'options', and how your computer resolves DNS
> for
> localhost vs 172.17.0.1.  I would try something like
>
>    options(repos = c(CRAN = "http://localhost:3001/proxy";,
>                      C = "http://localhost:3002";,
>                      B = "http://localhost:3003/proxy";,
>                      A = "http://localhost:3004";))
>
> or the equivalent with 172.17.0.1. When I do that here I get errors from
> first to last as we expect:
>
>    > options(repos = c(CRAN = "http://localhost:3001/proxy";,
>                      C = "http://localhost:3002";,
>                      B = "http://localhost:3003/proxy";,
>                      A = "http://localhost:3004";))
>    > available.packages()
>    Warning: unable to access index for repository
> http://localhost:3001/proxy/src/contrib:
>      cannot open URL 'http://localhost:3001/proxy/src/contrib/PACKAGES'
>    Warning: unable to access index for repository
> http://localhost:3002/src/contrib:
>      cannot open URL 'http://localhost:3002/src/contrib/PACKAGES'
>    Warning: unable to access index for repository
> http://localhost:3003/proxy/src/contrib:
>      cannot open URL 'http://localhost:3003/proxy/src/contrib/PACKAGES'
>    Warning: unable to access index for repository
> http://localhost:3004/src/contrib:
>      cannot open URL 'http://localhost:3004/src/contrib/PACKAGES'
>         Package Version Priority Depends Imports LinkingTo Suggests
> Enhances License License_is_FOSS License_restricts_use OS_type Archs MD5sum
> NeedsCompilation File Repository
>    >
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

        [[alternative HTML version deleted]]

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

Reply via email to