[Bug 2074525] Re: dh_sphinxdoc fails to parse search.html generated file

Dmitry Shachnev 2074525 at bugs.launchpad.net
Tue Jul 30 08:59:24 UTC 2024


** Bug watch added: Debian Bug tracker #1076969
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076969

** Changed in: sphinx
       Status: New => Unknown

** Changed in: sphinx
 Remote watch: Debian Bug tracker #1059621 => Debian Bug tracker #1076969

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sphinx in Ubuntu.
https://bugs.launchpad.net/bugs/2074525

Title:
  dh_sphinxdoc fails to parse search.html generated file

Status in Sphinx:
  Unknown
Status in sphinx package in Ubuntu:
  New

Bug description:
  Since sphinx (7.3.7-1), when introduced the following change

  +  * dh_sphinxdoc: Support loading searchindex.js with defer="defer"

  
  implemented in this way:

  diff -Nru sphinx-7.2.6/debian/dh-sphinxdoc/dh_sphinxdoc sphinx-7.3.7/debian/dh-sphinxdoc/dh_sphinxdoc
  --- sphinx-7.2.6/debian/dh-sphinxdoc/dh_sphinxdoc	2024-06-16 14:34:33.000000000 +0000
  +++ sphinx-7.3.7/debian/dh-sphinxdoc/dh_sphinxdoc	2024-07-03 07:18:22.000000000 +0000
  @@ -290,7 +290,7 @@
           }
       }
       defined $documentation_options or error("DOCUMENTATION_OPTIONS not found");
  -    my $loads_searchindex = $search =~ m{<script(?: type="text/javascript")? src="[^"]*searchindex.js\s?"(?: defer)?>};
  +    my $loads_searchindex = $search =~ m{<script(?: type="text/javascript")? src="[^"]*searchindex.js\s?"(?: defer(?:="defer"))?>};
       unless ($loads_searchindex)
       {
           # old style, used before Sphinx 2.0

  if a generated search.html file has only defer when loading
  searchindex.js, e. g.:

          <script type="text/javascript" src="searchindex.js"
  defer></script>

  dh_sphinxdoc fails with:

  dh_sphinxdoc: error: <doc_path>/search.html does not load
  searchindex.js.

  It has been seen in the mako package, preventing its build [1]

  https://launchpadlibrarian.net/741379311/buildlog_ubuntu-oracular-
  amd64.mako_1.3.5-1.1_BUILDING.txt.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/sphinx/+bug/2074525/+subscriptions




More information about the foundations-bugs mailing list