From maechler at stat.math.ethz.ch  Fri Mar 13 22:25:26 2009
From: maechler at stat.math.ethz.ch (maechler at stat.math.ethz.ch)
Date: Fri, 13 Mar 2009 22:25:26 +0100 (CET)
Subject: [Rd] installed.packages and package info cache buglet (PR#13592)
Message-ID: <20090313212526.72D892834323@mail.pubhealth.ku.dk>

>>>>> 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



[Rd] installed.packages and package info cache buglet (PR#13592)
maechler at stat.math.ethz.ch