eddelbuettel / r2u

CRAN as Ubuntu Binaries

Home Page:https://eddelbuettel.github.io/r2u

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

r-cran-nlme version conflict prevents installing r-recommended

zeehio opened this issue · comments

Hi,

I suspect the r-cran-nlme package on the r2u repository should have version number 3.1-157 instead of 3.1.157. Here is why I have this suspicion:

On a new ubuntu 22.04 system, I followed the r2u instructions to get R set up with r2u. I did not have R installed in the system.

I followed the README instructions. You can see below the relevant apt repositories and pinning set as documented:

$ cat /etc/apt/sources.list.d/cranapt.list
deb [arch=amd64] https://dirk.eddelbuettel.com/cranapt jammy main
$ cat /etc/apt/sources.list.d/cran-ubuntu.list 
deb [arch=amd64] https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/
$  cat /etc/apt/preferences.d/99cranapt 
Package: *
Pin: origin "dirk.eddelbuettel.com"
Pin-Priority: 700

When I try to install r-base (after a successful apt update):

$ sudo apt install r-base
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-base : Depends: r-recommended (= 4.2.0-1.2204.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

My apt skills are limited, but I then try to install r-recommended to try to see what's going on:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-recommended : Depends: r-cran-nlme (>= 3.1.52) but 3.1-157-1.ca2204.1 is to be installed
E: Unable to correct problems, you have held broken packages.

If I apt show -a r-cran-nlme I see:

$ apt show -a r-cran-nlme
Package: r-cran-nlme
Version: 3.1.157-1.2204.0
Priority: optional
Section: gnu-r
Source: nlme
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Installed-Size: 2807 kB
Depends: r-base-core (>= 4.2.0-1.2204.0), r-api-4.0, r-cran-lattice (>= 0.12-11.1), libc6 (>= 2.35)
Replaces: r-recommended (<< 1.9.0)
Homepage: https://cran.r-project.org/package=nlme
Download-Size: 2217 kB
APT-Sources: https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ Packages
Description: GNU R package for (non-)linear mixed effects models
 This package provides functions to fit and compare linear and non-linear
 mixed-effects models.
 .
 This package is part of the set of packages that are 'recommended'
 by R Core and shipped with upstream source releases of R itself.

Package: r-cran-nlme
Version: 3.1.155-1
Priority: optional
Section: universe/math
Source: nlme
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Dirk Eddelbuettel <edd@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 2831 kB
Depends: r-base-core (>= 4.1.2-1ubuntu1), r-api-4.0, r-cran-lattice (>= 0.12-11.1), libc6 (>= 2.29)
Replaces: r-recommended (<< 1.9.0)
Homepage: https://cran.r-project.org/package=nlme
Download-Size: 2235 kB
APT-Sources: http://es.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: GNU R package for (non-)linear mixed effects models
 This package provides functions to fit and compare linear and non-linear
 mixed-effects models.
 .
 This package is part of the set of packages that are 'recommended'
 by R Core and shipped with upstream source releases of R itself.

Package: r-cran-nlme
Version: 3.1-157-1.ca2204.1
Priority: optional
Section: gnu-r
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Installed-Size: 2811 kB
Depends: libc6 (>= 2.35), r-base-core (>= 4.2.0), r-api-4.0, r-cran-lattice
Suggests: r-cran-hmisc, r-cran-mass, r-cran-sasmixed
Homepage: https://cran.r-project.org/package=nlme
Download-Size: 2230 kB
APT-Sources: https://dirk.eddelbuettel.com/cranapt jammy/main amd64 Packages
Description: CRAN Package 'nlme' (Linear and Nonlinear Mixed Effects Models)
 Fit and compare Gaussian linear and nonlinear mixed-effects models.

Comparing version numbers for my three entries (ubuntu repositories, CRAN ppa, r2u ppa), shouldn't the r2u entry be 3.1.157 instead of 3.1-157?

I will learn to force some package versions and make things work, I can manage, but I'm surprised it's not working and I'd like to give this feedback just in case this is unexpected or a typo...

Thanks

Good point, and thanks for the detailed report. I do see the same on my laptop using 22.04. Currently the nlme package from r2u comes last in the sort shown by apt-cache policy.

The approach of swapping a . for an - is something we added on the Debian side of packaging many years ago, and it seems like r2u needs to follow suit. I'll have to think about whether this is best done as a one-off or more generally for all CRAN versions carrying a hyphen.

Thanks again for catching this. I just addressed this as a one-off by updating nlme in both 20.04 and 22.04 as a new 3.1.157-* binary package so this specific blockage should be taken care of and e.g. r-recommended would install on a new system.

I will have to give this some more thought about how to best address this for the handful of other packages where an existing Debian binary may have the same "'hyphen to do" issue leading to sorting inconsistencies. I think I would prefer to minimise intervention in general and if possibly just cover the hopefully small number of affected packages. I'll probably try to identify them first.