Richard Cotton
2015-Feb-11 10:46 UTC
[Rd] update.packages with ask = FALSE will sometimes ask about updates
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?)
Rainer M Krug
2015-Feb-11 12:36 UTC
[Rd] update.packages with ask = FALSE will sometimes ask about updates
Richard Cotton <richierocks at gmail.com> writes:> 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?)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>-- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 494 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20150211/b70c63b7/attachment.bin>
Prof Brian Ripley
2015-Feb-13 07:11 UTC
[Rd] update.packages with ask = FALSE will sometimes ask about updates
On 11/02/2015 10:46, Richard Cotton wrote:> Today while running update.packages(ask = FALSE), R stopped to ask me > a question: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.> 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?)He missed the documented options (and the NEWS items, the posting guide ...). -- Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK
Richard Cotton
2015-Feb-13 19:01 UTC
[Rd] update.packages with ask = FALSE will sometimes ask about updates
On 13 February 2015 at 10:11, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:> 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.What I'm running doesn't matter if I'm asking for general opinion on the best behaviour. It has to work for everyone.> He missed the documented options (and the NEWS items, the posting guide > ...).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")
Reasonably Related Threads
- update.packages with ask = FALSE will sometimes ask about updates
- update.package() asking even when asked to not ask
- update.package() asking even when asked to not ask
- Regarding {KernSmooth} - Can a package on CRAN have non GPL copyrights?
- Patch submission / request.