[Python-modules-commits] [sphinx] 01/01: dh_sphinxdoc: Make missing SOURCELINK_SUFFIX a warning, not an error

Dmitry Shachnev mitya57 at moszumanska.debian.org
Sat Apr 1 12:33:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

mitya57 pushed a commit to branch debian/master
in repository sphinx.

commit 619f0edffa2e0f91c2d236e8ccfcb301ac0512a6
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Sat Apr 1 15:32:35 2017 +0300

    dh_sphinxdoc: Make missing SOURCELINK_SUFFIX a warning, not an error
    
    It looks like we break too many packages if it is an error.
---
 debian/changelog                 | 7 +++++++
 debian/dh-sphinxdoc/dh_sphinxdoc | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 079f1d3..bf72201 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+sphinx (1.5.3-2) UNRELEASED; urgency=medium
+
+  * dh_sphinxdoc: Use a better message for missing sourcelink_suffix, and
+    downgrade this error to a warning.
+
+ -- Dmitry Shachnev <mitya57 at debian.org>  Sat, 01 Apr 2017 15:31:36 +0300
+
 sphinx (1.5.3-1) experimental; urgency=medium
 
   * New upstream release.
diff --git a/debian/dh-sphinxdoc/dh_sphinxdoc b/debian/dh-sphinxdoc/dh_sphinxdoc
index 983bf3d..0ec5b2a 100755
--- a/debian/dh-sphinxdoc/dh_sphinxdoc
+++ b/debian/dh-sphinxdoc/dh_sphinxdoc
@@ -209,6 +209,11 @@ sub sanity_check($)
     my $loads_searchindex = $search =~ m/\QjQuery(function() { Search.loadIndex("\E/;
     my ($has_source) = $search =~ m{HAS_SOURCE:\s*(true|false)};
     my ($sourcelink_suffix) = $search =~ m{SOURCELINK_SUFFIX:\s*'([^']*)'};
+    unless (defined $sourcelink_suffix)
+    {
+        warning("SOURCELINK_SUFFIX is not defined in search.html, search will not work!");
+        $sourcelink_suffix = ".txt";
+    }
     my ($url_root) = $search =~ m{URL_ROOT:\s*'([^']*)'};
     (%js and $loads_searchindex and defined $has_source and defined $url_root) or error("$searchfn doesn't look like a Sphinx search page");
     $has_source = $has_source eq 'true';

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sphinx.git



More information about the Python-modules-commits mailing list