[Rd] possible bug in tools:::getRemotePkgDepends ?

Ben Bolker bolker at ufl.edu
Fri Apr 9 20:13:03 CEST 2010


  Executive summary: getRemotePkgDepends seems to use the wrong default
string to (try to) download the CRAN package information.
========================

  Someone asked me about the behavior of tools::pkgDepends() , and in
investigating I discovered the following:

## tools:::getRemotePkgDepends
## undebug(tools:::getRemotePkgDepends)

tools::pkgDepends("GDD")
## Error in tools::pkgDepends("GDD") : package 'GDD' was not found
## (correct!)

tools::pkgDepends("GDD",local=FALSE)
## Warning: unable to access index for
##  repository http://mira.sunsite.utk.edu/CRAN
## ** should be OK, my settings work for update packages

## descending into the problem:

tools:::getRemotePkgDepends("GDD")  ## same warning
tools:::getRemotePkgDepends("GDD",contriburl=NULL) ## OK!
tools:::getRemotePkgDepends("GDD",

contriburl=utils::contrib.url(getOption("repos")))
## OK

I think the problem is that getRemotePkgDepends has
default contriburl = getOption("repos")
which returns the 'head' of the repository:

> getOption("repos")
                              CRAN
"http://mira.sunsite.utk.edu/CRAN"

rather than

contrib.url(getOption("repos"))
[1] "http://mira.sunsite.utk.edu/CRAN/src/contrib"

  Is this (as it seems to me) a bug?  Should I report it as such?



-- 
Ben Bolker
Associate professor, Biology Dep't, Univ. of Florida
bolker at ufl.edu / people.biology.ufl.edu/bolker
GPG key: people.biology.ufl.edu/bolker/benbolker-publickey.asc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20100409/f524370f/attachment.bin>


More information about the R-devel mailing list