commit:     dbb05e7f6ce3292cd4011b43e267ef5fc2f90297
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 27 12:56:25 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 27 12:57:10 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbb05e7f

net-dns/bind: don't use sphinx for man pages unnecessarily

configure automagically uses sphinx even if prebuilt man pages
are available. Force fallback to prebuilt ones.

This blew up for a user during a large world upgrade as Portage had
no reason to believe bind would need a working Sphinx (w/ USE=-doc:
```
/usr/bin/sphinx-build -b man -d ./_build/.doctrees/man -W -c . -a -n -D 
version="@""PACKAGE_VERSION <AT> " -D today="@""RELEASE_DATE@" -D 
release="@""PACKAGE_VERSION@" -D rst_epilog="$(printf "${man_RST_EPILOG}")"  . 
./_build/man
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/sphinx-build", line 5, in <module>
    from sphinx.cmd.build import main
  File "/usr/lib/python3.11/site-packages/sphinx/cmd/build.py", line 21, in 
<module>
    from sphinx.application import Sphinx
  File "/usr/lib/python3.11/site-packages/sphinx/application.py", line 28, in 
<module>
    from sphinx.registry import SphinxComponentRegistry
  File "/usr/lib/python3.11/site-packages/sphinx/registry.py", line 14, in 
<module>
    from sphinx.extension import Extension
  File "/usr/lib/python3.11/site-packages/sphinx/extension.py", line 7, in 
<module>
    from packaging.version import InvalidVersion, Version
ModuleNotFoundError: No module named 'packaging'
make[3]: *** [Makefile:1007: manpages.stamp] Error 1
``

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-dns/bind/bind-9.18.31-r1.ebuild | 4 ++++
 net-dns/bind/bind-9.20.7.ebuild     | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/net-dns/bind/bind-9.18.31-r1.ebuild 
b/net-dns/bind/bind-9.18.31-r1.ebuild
index 2b84a8ec5420..3ff930a6a48f 100644
--- a/net-dns/bind/bind-9.18.31-r1.ebuild
+++ b/net-dns/bind/bind-9.18.31-r1.ebuild
@@ -66,6 +66,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # configure automagically uses sphinx even if prebuilt man pages
+       # are available. Force fallback to prebuilt ones.
+       use doc || export SPHINX_BUILD=false
+
        local myeconfargs=(
                --prefix="${EPREFIX}"/usr
                --sysconfdir="${EPREFIX}"/etc/bind

diff --git a/net-dns/bind/bind-9.20.7.ebuild b/net-dns/bind/bind-9.20.7.ebuild
index 097857a4740c..cf36767b606c 100644
--- a/net-dns/bind/bind-9.20.7.ebuild
+++ b/net-dns/bind/bind-9.20.7.ebuild
@@ -64,6 +64,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # configure automagically uses sphinx even if prebuilt man pages
+       # are available. Force fallback to prebuilt ones.
+       use doc || export SPHINX_BUILD=false
+
        local myeconfargs=(
                --prefix="${EPREFIX}"/usr
                --sysconfdir="${EPREFIX}"/etc/bind

Reply via email to