Checking how the feature works I think there was a mistake in the addition to sage/features/databases.py for knotinfo. It checks for a sage python module presence, which will always be there since it is part of sage, when it should have checked for a static file, like for the other databases.
> On 7/06/2021, at 13:18, François Bissey <[email protected]> wrote: > > I have trouble building the documentation in sage-on-gentoo because of #30352 > which doesn’t seem to be > implementing features properly. That error wouldn’t happen on vanilla sage > because the build is not done > in a sandbox and the build system wouldn’t try to write a system location. > > * python3_9: running distutils-r1_run_phase python_compile_all > /var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/rings/padics/padic_base_leaves.py:1104: > DeprecationWarning: invalid escape sequence \Z > """ > /var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/rings/padics/padic_base_leaves.py:1139: > DeprecationWarning: invalid escape sequence \Q > """ > * ACCESS DENIED: unlinkat: /usr/share/sage/knotinfo > rm: cannot remove '/usr/share/sage/knotinfo': Permission denied > * ACCESS DENIED: mkdir: /usr/share/sage/knotinfo > Traceback (most recent call last): > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/databases/knotinfo_db.py", > line 420, in demo_version > self._num_knots = load(num_knots_file) > File "sage/misc/persist.pyx", line 187, in sage.misc.persist.load > (/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/cythonized/sage/misc/persist.c:2807) > with open(filename, 'rb') as fobj: > FileNotFoundError: [Errno 2] No such file or directory: > '/usr/share/sage/knotinfo/num_knots.sobj' > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/sage_docbuild/__main__.py", > line 1, in <module> > from sage_docbuild import main > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/sage_docbuild/__init__.py", > line 57, in <module> > import sage.all > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/all.py", > line 215, in <module> > from sage.knots.all import * > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/knots/all.py", > line 6, in <module> > if DatabaseKnotInfo().is_present(): > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/features/__init__.py", > line 162, in is_present > res = self._is_present() > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/features/__init__.py", > line 823, in _is_present > importlib.import_module(self.name) > File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module > return _bootstrap._gcd_import(name[level:], package, level) > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/knots/knotinfo.py", > line 239, in <module> > from sage.databases.knotinfo_db import KnotInfoColumns, db > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/databases/knotinfo_db.py", > line 815, in <module> > dc = db.columns() > File "sage/misc/cachefunc.pyx", line 2310, in > sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ > (/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/cythonized/sage/misc/cachefunc.c:12918) > self.cache = f(self._instance) > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/databases/knotinfo_db.py", > line 594, in columns > column_dict = self.read_column_dict() > File "sage/misc/cachefunc.pyx", line 2310, in > sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ > (/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/cythonized/sage/misc/cachefunc.c:12918) > self.cache = f(self._instance) > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/databases/knotinfo_db.py", > line 617, in read_column_dict > if self.demo_version(): > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/databases/knotinfo_db.py", > line 422, in demo_version > self.reset_filecache() > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/databases/knotinfo_db.py", > line 391, in reset_filecache > sage_makedirs(sobj_path) > File > "/var/tmp/portage/sci-mathematics/sage-9999/work/sage-9999/src-python3_9/build/lib/sage/misc/misc.py", > line 93, in sage_makedirs > os.makedirs(dirname) > File "/usr/lib/python3.9/os.py", line 225, in makedirs > mkdir(name, mode) > PermissionError: [Errno 13] Permission denied: '/usr/share/sage/knotinfo’ > > Various bits of sage try to recreate share/knotinfo/num_knots.sobj which > isn’t installed because I haven’t > packaged it yet. This shouldn’t be an issue since database_knotinfo is still > optional. > The problem here is that it seems that _feature.is_present() is always true, > including when it is called > at > https://github.com/sagemath/sage/blob/develop/src/sage/databases/knotinfo_db.py#L416 > > I cannot find where it could be found as being false in the current code. > > François > > >> On 7/06/2021, at 06:40, Volker Braun <[email protected]> wrote: >> >> As always, you can get the latest beta version from the "develop" git >> branch. Alternatively, the self-contained source tarball is at >> http://www.sagemath.org/download-latest.html >> >> >> 30ee8d6505 (tag: 9.4.beta1, trac/develop) Updated SageMath version to >> 9.4.beta1 >> 7690208434 Trac #31903: Build errors in padic_relaxed_element >> 605c100c46 Trac #31848: Random failure: sage.libs.gap.util.GAPError: Error, >> OnSets: <set> must be a set >> 24a34ee595 Trac #31825: Failure when testing sage_conf version >> 5067635403 Trac #31692: Refactor display behavior of mixed forms >> 08b5a55b44 Trac #31691: Turn mixed form algebra into de Rham complex >> e30645c055 Trac #31686: Speed up factoring finite field multiplicative order >> 490c3ddfeb Trac #31684: Improve WordMorphism._language_naive >> 3e413ce3b4 Trac #31681: DiGraph.layout_acyclic_dummy assumes it can sort >> lists of vertices >> 5b23c1fac2 Trac #31677: Open subsets of arbitrary subsets of manifolds >> a8ed75663a Trac #31676: Hash of mpmath complex numbers produces OverFlowError >> 24c78cf7f3 Trac #31674: Make open subsets of immersed/embedded submanifolds >> immersed/embedded submanifolds >> 2f2b1540f7 Trac #31658: Slight speed-up in copy method >> fc7a3728c8 Trac #31654: copy_from for scalar fields >> db698c31ed Trac #31653: Images of continuous maps and embedded submanifolds >> as manifold subsets >> b573a54ba3 Trac #31650: improve LazyImport >> 8600573a7f Trac #31647: Update sympy to 1.8 >> b2aa0f6261 Trac #31633: Simplify VectorField.__call__ >> 4200c96400 Trac #31619: Cholesky factorization and positive-definite testing >> over inexact rings >> 60380a3cf3 Trac #31618: Some documentation improvements in >> sage.modular.quatalg.brandt >> ab0715d126 Trac #31615: faster order complex for posets >> c95fe8492a Trac #31614: Remove dead _cholesky_decomposition_ from matrix2.pyx >> 749b0ad122 Trac #31613: ClusterAlgebra.greedy_element bug and further >> improvements >> ad89df812b Trac #31609: Add method tangent_vector to differentiable manifolds >> 63c3d0fecb Trac #31594: Accept giac-1.7.x from the system >> c58463cf86 Trac #31526: Drop support for optional packages with system gcc >> 4.x on ubuntu-trusty, debian-jessie, linuxmint-17, centos-7 >> 8d55a3f756 Trac #31489: Galois subgroups >> 9c85a6c1cf Trac #30352: Interface to the KnotInfo and LinkInfo databases >> 9f031cdb05 Trac #29222: Improvements to padic polylog >> 9caac06757 Trac #28890: Install fewer static libraries >> e94bd31252 Trac #26635: Major extensions to local components code >> 9f3988d9a5 Trac #21203: basic element and parent for k-regular sequences >> 3b414bea4b Trac #20331: A MIPVariable's repr should include some useful >> information >> 061d4b71df Trac #31860: Restore support for sage-bootstrap-python = python >> 3.6 >> 6aa4ecee16 (tag: 9.4.beta0) Updated SageMath version to 9.4.beta0 >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-release" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sage-release/8b14f1ca-ba5f-45c6-875f-b6d45a789806n%40googlegroups.com. > -- You received this message because you are subscribed to the Google Groups "sage-release" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-release/51F45C34-8A19-4F77-AFE9-3F587DB9147B%40gmail.com.
