[Python-modules-team] Bug#877202: pyxdg FTBFS and Debci failure: ERROR: test_validate_icon_theme (test-icon.IconThemeTest)

Steve Langasek steve.langasek at canonical.com
Wed Apr 25 07:09:51 BST 2018


Package: pyxdg
Followup-For: Bug #877202
User: ubuntu-devel at lists.ubuntu.com
Usertags: bionic ubuntu-patch

Dear maintainers,

A fix for this is available upstream for this build failure in the form of a
new 0.26 release.

If for some reason you are not ready to take the new upstream version of
pyxdg, you can also cherry pick the attached two patches to fix the build
failure, as in the attached debdiff which I have uploaded to Ubuntu to fix
the failure there.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru pyxdg-0.25/debian/patches/0001-Allow-ScaledDirectories-key-in-icon-theme-file.patch pyxdg-0.25/debian/patches/0001-Allow-ScaledDirectories-key-in-icon-theme-file.patch
--- pyxdg-0.25/debian/patches/0001-Allow-ScaledDirectories-key-in-icon-theme-file.patch	1969-12-31 16:00:00.000000000 -0800
+++ pyxdg-0.25/debian/patches/0001-Allow-ScaledDirectories-key-in-icon-theme-file.patch	2018-04-24 22:47:59.000000000 -0700
@@ -0,0 +1,34 @@
+From 69707442963112f92d72ad39f8fda93d7760e437 Mon Sep 17 00:00:00 2001
+From: Thomas Kluyver <thomas at kluyver.me.uk>
+Date: Fri, 2 Feb 2018 14:27:53 +0000
+Subject: [PATCH] Allow 'ScaledDirectories' key in icon theme file
+
+---
+ xdg/IconTheme.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/xdg/IconTheme.py b/xdg/IconTheme.py
+index e026d4e..bda8b8f 100644
+--- a/xdg/IconTheme.py
++++ b/xdg/IconTheme.py
+@@ -37,6 +37,8 @@ class IconTheme(IniFile):
+         return self.get('Inherits', list=True)
+     def getDirectories(self):
+         return self.get('Directories', list=True)
++    def getScaledDirectories(self):
++        return self.get('ScaledDirectories', list=True)
+     def getHidden(self):
+         return self.get('Hidden', type="boolean")
+     def getExample(self):
+@@ -143,6 +145,8 @@ class IconTheme(IniFile):
+                 self.checkValue(key, value, list=True)
+             elif key == "Directories":
+                 self.checkValue(key, value, list=True)
++            elif key == "ScaledDirectories":
++                self.checkValue(key, value, list=True)
+             elif key == "Hidden":
+                 self.checkValue(key, value, type="boolean")
+             elif key == "Example":
+-- 
+2.17.0
+
diff -Nru pyxdg-0.25/debian/patches/0001-Allow-Scale-in-icon-theme-per-directory-sections.patch pyxdg-0.25/debian/patches/0001-Allow-Scale-in-icon-theme-per-directory-sections.patch
--- pyxdg-0.25/debian/patches/0001-Allow-Scale-in-icon-theme-per-directory-sections.patch	1969-12-31 16:00:00.000000000 -0800
+++ pyxdg-0.25/debian/patches/0001-Allow-Scale-in-icon-theme-per-directory-sections.patch	2018-04-24 22:47:52.000000000 -0700
@@ -0,0 +1,36 @@
+From 056dbc12ed21abf601609751eee117a06d3d26a7 Mon Sep 17 00:00:00 2001
+From: Thomas Kluyver <thomas at kluyver.me.uk>
+Date: Fri, 2 Feb 2018 14:26:28 +0000
+Subject: [PATCH] Allow 'Scale' in icon theme per-directory sections
+
+---
+ xdg/IconTheme.py | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/xdg/IconTheme.py b/xdg/IconTheme.py
+index d795484..e026d4e 100644
+--- a/xdg/IconTheme.py
++++ b/xdg/IconTheme.py
+@@ -72,6 +72,10 @@ class IconTheme(IniFile):
+         else:
+             return 2
+ 
++    def getScale(self, directory):
++        value = self.get('Scale', type="integer", group=directory)
++        return value or 1
++
+     # validation stuff
+     def checkExtras(self):
+         # header
+@@ -168,6 +172,8 @@ class IconTheme(IniFile):
+                 self.checkValue(key, value, type="integer")
+                 if self.type != "Threshold":
+                     self.errors.append("Key 'Threshold' give, but Type is %s" % self.type)
++            elif key == "Scale":
++                self.checkValue(key, value, type="integer")
+             elif re.match("^X-[a-zA-Z0-9-]+", key):
+                 pass
+             else:
+-- 
+2.17.0
+
diff -Nru pyxdg-0.25/debian/patches/series pyxdg-0.25/debian/patches/series
--- pyxdg-0.25/debian/patches/series	2014-01-27 10:04:35.000000000 -0800
+++ pyxdg-0.25/debian/patches/series	2018-04-24 22:48:32.000000000 -0700
@@ -3,3 +3,5 @@
 gettext-support.patch
 prefer-first-glob-for-finding-mimetype.patch
 fix-insecure-use-of-tmp.patch
+0001-Allow-Scale-in-icon-theme-per-directory-sections.patch
+0001-Allow-ScaledDirectories-key-in-icon-theme-file.patch


More information about the Python-modules-team mailing list