[Rd] installed.packages and package info cache buglet (PR#13592)

maechler at stat.math.ethz.ch maechler at stat.math.ethz.ch
Fri Mar 13 22:25:26 CET 2009


>>>>> Mark Bravington <Mark.Bravington at csiro.au>
>>>>>     on Thu, 12 Mar 2009 21:45:18 +0100 (CET) writes:

>> Looks like there is a buglet in 'installed.packages', around line 17:
>> 
>>     for (lib in lib.loc) {
>>         dest <- file.path(tempdir(), paste("libloc_", URLencode(lib,=20
>>             TRUE), paste(fields, collapse =3D ","), ".rds", sep =3D ""))
>>         if (!noCache && file.exists(dest) && file.info(dest)$mtime >=20
>>             file.info(lib.loc)$mtime) {
>> 
>>                       ^^^^^^^
>>                      =20
>> The 'lib.loc' should be 'lib', otherwise the comparison is always against t=
>> he first library in 'lib.loc', not against the one being checked. [Normally=
>>  the multiple test in '>' would flag a warning from 'if', but the &&s mean =
>> that only the first element is used.]
>> 
>> I can't provide a reproducible example for this, because it's so installati=
>> on-dependent.
>> 
>> Still present in R-devel from 8th March.

and today.  Thank you, Mark,  I've corrected it (in R-devel
only).

Martin Maechler, ETH Zurich


>> Mark Bravington
>> CSIRO
>> Hobart
>> Australia



More information about the R-devel mailing list