[linux] 01/01: docs: sphinx-extensions: make rstFlatTable work with docutils 0.13

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Mon Dec 19 07:59:57 UTC 2016


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

carnil pushed a commit to branch sid
in repository linux.

commit 36b7372766e45c4b01bfebc9472bbb33cba392bd
Author: Salvatore Bonaccorso <carnil at debian.org>
Date:   Mon Dec 19 08:28:31 2016 +0100

    docs: sphinx-extensions: make rstFlatTable work with docutils 0.13
    
    Thanks: Dmitry Shachnev <mitya57 at debian.org>
    Closes: #848349
---
 debian/changelog                                   |  2 ++
 ...-extensions-make-rstFlatTable-work-with-d.patch | 40 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 43 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 14384ff..a690155 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -162,6 +162,8 @@ linux (4.8.15-1) UNRELEASED; urgency=medium
   * [rt] Update to 4.8.14-rt9
   * netfilter: ipv6: nf_defrag: drop mangled skb on ream error (CVE-2016-9755)
   * Ignore ABI changes in libnvdimm
+  * docs: sphinx-extensions: make rstFlatTable work with docutils 0.13.
+    Thanks to Dmitry Shachnev <mitya57 at debian.org> (Closes: #848349)
 
   [ Ben Hutchings ]
   * [amd64] Re-enable LEGACY_VSYSCALL_EMULATE instead of LEGACY_VSYSCALL_NONE.
diff --git a/debian/patches/bugfix/all/docs-sphinx-extensions-make-rstFlatTable-work-with-d.patch b/debian/patches/bugfix/all/docs-sphinx-extensions-make-rstFlatTable-work-with-d.patch
new file mode 100644
index 0000000..9df2f9d
--- /dev/null
+++ b/debian/patches/bugfix/all/docs-sphinx-extensions-make-rstFlatTable-work-with-d.patch
@@ -0,0 +1,40 @@
+From: Dmitry Shachnev <mitya57 at debian.org>
+Date: Sun, 18 Dec 2016 13:11:46 +0300
+Subject: docs: sphinx-extensions: make rstFlatTable work with docutils 0.13
+Origin: https://git.kernel.org/linus/7a3bd0906838c816c22b27792c6c3fe4c53e0893
+Bug-Debian: https://bugs.debian.org/848349
+
+In docutils 0.13, the return type of get_column_widths method of the
+Table directive has changed [1], which breaks our flat-table directive
+and leads to a TypeError when trying to build the docs [2].
+
+This patch adds support for the new return type, while keeping support
+for older docutils versions too.
+
+[1] https://sourceforge.net/p/docutils/patches/120/
+[2] https://sourceforge.net/p/docutils/bugs/303/
+
+Signed-off-by: Dmitry Shachnev <mitya57 at xxxxxxxxxx>
+---
+ Documentation/sphinx/rstFlatTable.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/Documentation/sphinx/rstFlatTable.py b/Documentation/sphinx/rstFlatTable.py
+index 55f2757..25feb0d 100755
+--- a/Documentation/sphinx/rstFlatTable.py
++++ b/Documentation/sphinx/rstFlatTable.py
+@@ -157,6 +157,11 @@ class ListTableBuilder(object):
+     def buildTableNode(self):
+ 
+         colwidths    = self.directive.get_column_widths(self.max_cols)
++        if isinstance(colwidths, tuple):
++            # Since docutils 0.13, get_column_widths returns a (widths,
++            # colwidths) tuple, where widths is a string (i.e. 'auto').
++            # See https://sourceforge.net/p/docutils/patches/120/.
++            colwidths = colwidths[1]
+         stub_columns = self.directive.options.get('stub-columns', 0)
+         header_rows  = self.directive.options.get('header-rows', 0)
+ 
+-- 
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 1f6687d..44ae1cc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -64,6 +64,7 @@ bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch
 bugfix/all/kbuild-do-not-use-hyphen-in-exported-variable-name.patch
 bugfix/all/ext4-fix-bug-838544.patch
 bugfix/all/mm-memcontrol-use-special-workqueue-for-creating-per-memcg-caches.patch
+bugfix/all/docs-sphinx-extensions-make-rstFlatTable-work-with-d.patch
 
 # Miscellaneous features
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list