Skip to content

downgrading to R 2.15.1-4 from sid beta 3.0.0

5 messages · Dirk Eddelbuettel, Sébastien Bihorel, Charles Plessy

#
Hi,

I'm using sid, and this morning I carelessly upgraded R core packages,
which are currently at the beta 3.0.0 version.  I hadn't read that
packages need to be re-built to be used with this beta version.  I'd
happily do that locally (via 'install.packages') for those that haven't
yet been re-built in Debian, but some just don't allow that, notably
nlme which has a Depends on R (? 2.14.0), R (< 3.0.0)...  So I decided
to just downgrade the base packages, temporarily remove the r-cran-*
dependendants, and then install nlme (and others) locally until the
April release of 3.0.0 and the rest of the packages get rebuilt in
Debian.

Is there a more efficient way to deal with this when a new R requires
such rebuilds in Debian?

Thanks,
#
On 25 March 2013 at 12:01, Sebastian P. Luque wrote:
| Hi,
| 
| I'm using sid, and this morning I carelessly upgraded R core packages,
| which are currently at the beta 3.0.0 version.  I hadn't read that
| packages need to be re-built to be used with this beta version.  I'd
| happily do that locally (via 'install.packages') for those that haven't
| yet been re-built in Debian, but some just don't allow that, notably
| nlme which has a Depends on R (? 2.14.0), R (< 3.0.0)...  So I decided
| to just downgrade the base packages, temporarily remove the r-cran-*
| dependendants, and then install nlme (and others) locally until the
| April release of 3.0.0 and the rest of the packages get rebuilt in
| Debian.
| 
| Is there a more efficient way to deal with this when a new R requires
| such rebuilds in Debian?

a) You are on unstable... So sorry for the breakage but that is why
'production' should run testing or stable.

b) There is a simple update.package() invocation you can do, it will update
all you packages (in /usr/lib/R as well as /usr/local/lib/R); it needs an
argument you need to set...

c) If you must downgrade, I would downgrade to 2.15.3-2 from CRAN rather than
2.15.1.

Dirk
#
On Mon, 25 Mar 2013 13:14:15 -0500,
Dirk Eddelbuettel <edd at debian.org> wrote:

            
I know, and am usually more careful than that with unstable...
Indeed, and (off topic) I wrote a function `ess-rutils-update-pkgs' in
ess-rutils, to make this easy from iESS mode.  However, wont't this
break the Debian packages placed in /usr/lib/R, when the 'lib.loc'
argument matches this (this would need normally need super user access)?
Great, doing that right now.

Thanks,
#
Le Mon, Mar 25, 2013 at 03:14:11PM -0500, Sebastian P. Luque a ?crit :
Hi Sebastian and everybody,

Note (if it helps) that it is also available from snapshot.debian.org.

    http://snapshot.debian.org/package/r-base/

Cheers,
#
On 26 March 2013 at 07:35, Charles Plessy wrote:
| Le Mon, Mar 25, 2013 at 03:14:11PM -0500, Sebastian P. Luque a ?crit :
| > On Mon, 25 Mar 2013 13:14:15 -0500,
| > Dirk Eddelbuettel <edd at debian.org> wrote:
| > 
| > > c) If you must downgrade, I would downgrade to 2.15.3-2 from CRAN
| > > rather than 2.15.1.
| > 
| > Great, doing that right now.
| 
| Hi Sebastian and everybody,
| 
| Note (if it helps) that it is also available from snapshot.debian.org.
| 
|     http://snapshot.debian.org/package/r-base/

Ace -- thanks for the reminder about snapshot.d.o.

As for Seb's query about mass-updates: what you do from ESS, I do from shell
via littler -- and yes, I usually control via lib.loc(). In this case we may
want to force it everywhere... though I can't fully recommend to overwrite
files owned by dpkg and apt-*.  If it breaks, you keep the pieces.

And lastly, this is of course a bug in r-base as it could potentially
conflict with its dependents. In practive, I don't see how we could do this
easily so the best bet is probably to simply upgrade the .deb packages as
fast as possible.

Dirk

My ~/bin/update.r is below, with some comments removed. A version is also in
the littler sources and Debian package.

#!/usr/bin/r -t
#
# a simple example to update packages in /usr/local/lib/R/site-library
# parameters are easily adjustable

## adjust as necessary, see help('download.packages')
repos <- "http://cran.r-project.org"

## this makes sense on Debian where no package touch /usr/local
lib.loc <- "/usr/local/lib/R/site-library"

## simply unrolling of all unlink over all files 'repos*' in $TMP
clearCache <- function() {
  sapply(list.files(path=tempdir(), pattern="repos_http", full.names=TRUE), unlink)
}

## Always clear caches of remote and local packages
clearCache()

## r use requires non-interactive use
update.packages(repos=repos, ask=FALSE, lib.loc=lib.loc)

## Always clear caches of remote and local packages
clearCache()