[Pkg-mozext-commits] [perspectives-extension] 01/02: Fix for behaviour change in lxml 3.5.0

David Prévot taffit at moszumanska.debian.org
Thu Dec 24 16:07:37 UTC 2015


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

taffit pushed a commit to branch master
in repository perspectives-extension.

commit fc211133f10471079e1378df7d81433cb986290e
Author: David Prévot <david at tilapin.org>
Date:   Thu Dec 24 09:27:41 2015 -0400

    Fix for behaviour change in lxml 3.5.0
    
    Closes: #807673
---
 ...plicitly-specify-namespace-s-when-searchi.patch | 40 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 41 insertions(+)

diff --git a/debian/patches/0001-checkloc-explicitly-specify-namespace-s-when-searchi.patch b/debian/patches/0001-checkloc-explicitly-specify-namespace-s-when-searchi.patch
new file mode 100644
index 0000000..30af611
--- /dev/null
+++ b/debian/patches/0001-checkloc-explicitly-specify-namespace-s-when-searchi.patch
@@ -0,0 +1,40 @@
+From: Dave Schaefer <dave.schaefer at gmail.com>
+Date: Sun, 13 Dec 2015 13:58:15 -0700
+Subject: checkloc - explicitly specify namespace(s) when searching
+
+Fix for behaviour change in lxml 3.5.0
+
+Origin: upstream, https://github.com/daveschaefer/checkloc/commit/cd23d46b5a5a51a1f5b25e339acbc865ba2cb618
+Bug: https://github.com/danwent/Perspectives/issues/166 https://github.com/daveschaefer/checkloc/issues/14
+Bug-Debian: https://bugs.debian.org/807673
+---
+ test/extlib/checkloc.py | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/test/extlib/checkloc.py b/test/extlib/checkloc.py
+index 024f1ac..9ff912d 100644
+--- a/test/extlib/checkloc.py
++++ b/test/extlib/checkloc.py
+@@ -46,7 +46,7 @@ import localecodes
+ # MAJOR version when you make backwards-incompatible changes,
+ # MINOR version when you add functionality in a backwards-compatible manner
+ # PATCH version when you make backwards-compatible bug fixes.
+-VERSION = "2.1"
++VERSION = "2.1.1"
+ 
+ # the en-US translation will have all files and strings created. Use it as the base.
+ BASE_LOC = 'en-US'
+@@ -477,7 +477,12 @@ class ManifestSet:
+ 		try:
+ 			xml = etree.parse(install_rdf)
+ 			root = xml.getroot()
+-			for locale in root.findall('.//em:locale', root.nsmap):
++			# lxml 3.5.0 raises a ValueError if the namespace map
++			# contains a 'None' entry, even if it also contains
++			# other valid mappings.
++			# Therefore explicitly add only the namespaces we need
++			ns = {'em': 'http://www.mozilla.org/2004/em-rdf#'}
++			for locale in root.findall('.//em:locale', ns):
+ 				loc = locale.text
+ 				if loc not in self.rdf_locs:
+ 					self.rdf_locs[loc] = True
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..62405b4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-checkloc-explicitly-specify-namespace-s-when-searchi.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/perspectives-extension.git



More information about the Pkg-mozext-commits mailing list