-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[r-apt] "installBspm": true
is not working on Debian
#173
Comments
Not sure what happens here... I see: $ sudo /usr/local/lib/R/site-library/bspm/service/bspm.py discover
Traceback (most recent call last):
File "/usr/local/lib/R/site-library/bspm/service/bspm.py", line 150, in <module>
read_conf()
File "/usr/local/lib/R/site-library/bspm/service/bspm.py", line 16, in read_conf
conf = backend.discover()
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/R/site-library/bspm/service/backend/apt.py", line 14, in discover
cache = apt.Cache()
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/apt/cache.py", line 170, in __init__
self.open(progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 232, in open
self._cache = apt_pkg.Cache(progress)
^^^^^^^^^^^^^^^^^^^^^^^
apt_pkg.Error: E:The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources But then, after running |
Thanks for looking at this. devcontainer-features/src/r-apt/install.sh Lines 157 to 160 in 583387a
Do you think bspm should automatically run |
It does update the cache here: But note that the error is raised one line before that, when we are just instantiating the bspm runs just fine with |
[Removing my previous comment since I forgot to add the repos. My last comment still holds]. |
Here's a minimal reprex: $ docker run --rm -it mcr.microsoft.com/devcontainers/base:debian
$ echo "deb http://http.debian.net/debian testing main" >/etc/apt/sources.list.d/debian-testing.list
$ echo 'APT::Default-Release "testing";' >/etc/apt/apt.conf.d/default
$ apt-get -y update && apt-get -y install python3-apt
$ rm -rf /var/lib/apt/lists/*
$ python3 -c "import apt; apt.Cache()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/apt/cache.py", line 170, in __init__
self.open(progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 232, in open
self._cache = apt_pkg.Cache(progress)
^^^^^^^^^^^^^^^^^^^^^^^
apt_pkg.Error: E:The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources I.e. |
Thanks, Interestingly, a search on that error message turned up previous issues of the Rocker project. (rocker-org/rocker#167) |
It's strange, because, according to the docs, import apt
# First of all, open the cache
cache = apt.Cache()
# Now, lets update the package list
cache.update() should be equivalent to |
Another question is: do you really need to set |
Thanks for taking a closer look at this.
This certainly looks like a bug in python-apt.
I simply wanted to provide a way to install the latest R. I don't know if this is the best way to do it. |
All package managers install the latest package versions by default, and APT is no exception. So if you just add the testing repositories, the latest R will be pulled. From what I've seen, the typical use of TL;DR, unless I'm missing something (please @eddelbuettel correct me if I'm wrong), I think you can just drop that line and everything will work as intended here. |
Good call by @Enchufa2 I usually just work with 'testing' and may at times select into 'unstable' -- this iss what Rocker's r-base and derived containers do. I have the suspicion that forcing 'stable' may be the issue but I just don't know. There are scary many options to FWIW I just fired up rocker/r-bspm:testing and asked it to This setup has |
This PR also tweaks installation on Debian. (Related to #173 (comment))
I have confirmed that
install.packages("curl")
fails on R started by a non-root user (vscode
) on an image built from devcontainer.json as shown below.This setup corresponds to the following script run with
INSTALLBSPM=true
.https://github.com/rocker-org/devcontainer-features/blob/583387a2831c181905c571b306f3a976affbe5cb/src/r-apt/install.sh
Perhaps the script contains improper settings somewhere?
Originally posted by @eitsupi in #169 (comment)
The text was updated successfully, but these errors were encountered: