Skip to content

update.packages with ask = FALSE will sometimes ask about updates

4 messages · Rainer M Krug, Brian Ripley, Richard Cotton

#
Today while running update.packages(ask = FALSE), R stopped to ask me
a question:

  There are binary versions available but the source versions are later:
            binary  source needs_compilation
KernSmooth 2.23-13 2.23-14              TRUE
mixture        1.2     1.3              TRUE

Do you want to install from sources the packages which need compilation?
y/n:


update.packages calls install.packages which calls getDependencies,
which was where there question originated.

It seems to me that if I've set ask = FALSE, stopping to ask questions
is a bug.  There are a few possible interpretations of the best
behaviour though, so I thought I'd put it up for discussion here
before (maybe) submitting as a bug.

1. The existing behaviour is correct: the case of out-of-date binaries
causes a special situation, and R is right to ask.

2. ask = FALSE means I want all updates, so don't ask me any
questions, just install all possible updates.

3. ask = FALSE means that I don't want any interactivity, but
out-of-date binaries is a special case, so R should just fail to
update these packages, with an error message stating that they need to
be manually updated.

4. There should be an extra argument that decides between the some or
all of the behaviours described in 1, 2 and 3.

Which of these options is best?  (Or have I missed an option?)
#
Richard Cotton <richierocks at gmail.com> writes:
I am with R (and youre first option). If I ask for binaries, I want
binaries (because I can not install from source, because I want them
fast, because I have locally different compilers, ...). So to silently
try to install sources instead of binaries could be completely
wrong. Although unlikely, the same applies the other way round, when I
ask for source.

THe other possible option would be 4, but instead of failing (the
binaries might still be newer then the installed versions) to give a
warning - as it is not more: For the settings asked for, these are, the
newest versions are installed - but be warned that there are newer
versions from source.

Thinking about it now, option 4 with warning should be the way to go.

Cheers,

Rainer

  
    
1 day later
#
On 11/02/2015 10:46, Richard Cotton wrote:
The 'at a minimum' information required by the posting guide is 
conspicuous by its absence.

At a guess, this is R-devel and Windows.

In response to a misled follow-up: he most likely did not ask for binary 
packages ... that is not the default on Windows in R-devel.
He missed the documented options (and the NEWS items, the posting guide 
...).
#
On 13 February 2015 at 10:11, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
What I'm running doesn't matter if I'm asking for general opinion on
the best behaviour.  It has to work for everyone.
All this is irrelevant.  Whatever my OS, and whatever the documented
options are, if I explicitly say I don't want interactive behaviour by
specifying ask = FALSE, then R stopping to ask me things feels like
incorrect behaviour.

----

Since there seems to be resistance to making any changes to the
behaviour, for future readers, the solution that has been suggested to
me to ensure that you don't get asked any questions is:

Make sure you can compile packages (on Windows this involves
installing Rtools).  Then explicitly set type = "source" when you use
ask = FALSE.

update.packages(ask = FALSE, type = "source")