Bug#911114: stretch-pu: package fofix-dfsg/3.121-5~deb9u1
Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu
fofix dies with a python NotImplementedError exception during startup.
(#873156)
Based on the submitters patch I've prepared a QA upload for stretch.
The upload to sid was only a dummy to serve as a base for fixing the bug
in stretch, the package is not installable in sid because of a
dependency on the no longer available python-imaging.
I could reproduce the bug in stretch and the fixed version starts
in stretch successfully, creating a GUI window.
The package is already uploaded.
Andreas
diff -Nru fofix-dfsg-3.121/debian/changelog fofix-dfsg-3.121/debian/changelog
--- fofix-dfsg-3.121/debian/changelog 2016-09-02 20:35:13.000000000 +0200
+++ fofix-dfsg-3.121/debian/changelog 2018-10-15 21:06:22.000000000 +0200
@@ -1,7 +1,23 @@
+fofix-dfsg (3.121-5~deb9u1) stretch; urgency=medium
+
+ * QA upload.
+ * Rebuild for stretch.
+
+ -- Andreas Beckmann <anbe@debian.org> Mon, 15 Oct 2018 21:06:22 +0200
+
+fofix-dfsg (3.121-5) unstable; urgency=medium
+
+ * QA upload.
+ * Call image.tobytes('raw', ...) instead of image.tostring('raw', ...),
+ thanks to Christian Trenkwalder. (Closes: #873156)
+ * Override source-contains-prebuilt-ms-help-file.
+
+ -- Andreas Beckmann <anbe@debian.org> Mon, 15 Oct 2018 18:25:19 +0200
+
fofix-dfsg (3.121-4) unstable; urgency=low
- * Orphaning package.
- * Build-Deps: Replayce python-support by dh-python
+ * Orphaning package.
+ * Build-Deps: Replace python-support by dh-python
-- Christian Brunotte <ch@debian.org> Fri, 02 Sep 2016 20:35:13 +0200
diff -Nru fofix-dfsg-3.121/debian/patches/series fofix-dfsg-3.121/debian/patches/series
--- fofix-dfsg-3.121/debian/patches/series 2013-01-09 00:24:24.000000000 +0100
+++ fofix-dfsg-3.121/debian/patches/series 2018-10-14 13:54:40.000000000 +0200
@@ -1 +1,2 @@
player-cache-location
+tostring.patch
diff -Nru fofix-dfsg-3.121/debian/patches/tostring.patch fofix-dfsg-3.121/debian/patches/tostring.patch
--- fofix-dfsg-3.121/debian/patches/tostring.patch 1970-01-01 01:00:00.000000000 +0100
+++ fofix-dfsg-3.121/debian/patches/tostring.patch 2018-10-15 14:25:26.000000000 +0200
@@ -0,0 +1,54 @@
+Author: Christian Trenkwalder <christian@trenkwalder.it>
+Description: switch from image.tostring() to image.tobytes()
+ Traceback (most recent call last):
+ [...]
+ File "/usr/share/fofix/src/Texture.py", line 77, in loadImage
+ string = image.tostring('raw', 'RGBA', 0, -1)
+ File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 697, in tostring
+ "Please call tobytes() instead.")
+ NotImplementedError: tostring() has been removed. Please call tobytes() instead.
+
+--- a/src/Texture.py
++++ b/src/Texture.py
+@@ -74,19 +74,19 @@ class Texture:
+ """Load the texture from a PIL image"""
+ image = image.transpose(Image.FLIP_TOP_BOTTOM)
+ if image.mode == "RGBA":
+- string = image.tostring('raw', 'RGBA', 0, -1)
++ string = image.tobytes('raw', 'RGBA', 0, -1)
+ self.loadRaw(image.size, string, GL_RGBA, 4)
+ elif image.mode == "RGB":
+- string = image.tostring('raw', 'RGB', 0, -1)
++ string = image.tobytes('raw', 'RGB', 0, -1)
+ self.loadRaw(image.size, string, GL_RGB, 3)
+ elif image.mode == "L":
+- string = image.tostring('raw', 'L', 0, -1)
++ string = image.tobytes('raw', 'L', 0, -1)
+ self.loadRaw(image.size, string, GL_LUMINANCE, 1)
+ else:
+ try:
+ image = image.convert('RGB')
+ Log.warn("Unsupported image mode '%s' converted to 'RGB'. May have unexpected results." % image.mode)
+- string = image.tostring('raw', 'RGB', 0, -1)
++ string = image.tobytes('raw', 'RGB', 0, -1)
+ self.loadRaw(image.size, string, GL_RGB, 3)
+ except:
+ raise TextureException("Unsupported image mode '%s'" % image.mode)
+@@ -113,7 +113,7 @@ class Texture:
+ # appears to be using PIL to do the conversion.
+ string = pygame.image.tostring(surface, "RGB")
+ image = Image.fromstring("RGB", surface.get_size(), string).convert("L")
+- string = image.tostring('raw', 'L', 0, -1)
++ string = image.tobytes('raw', 'L', 0, -1)
+ self.loadRaw(surface.get_size(), string, GL_LUMINANCE, GL_INTENSITY8)
+ else:
+ if alphaChannel:
+@@ -132,7 +132,7 @@ class Texture:
+ # appears to be using PIL to do the conversion.
+ string = pygame.image.tostring(surface, "RGB")
+ image = Image.fromstring("RGB", surface.get_size(), string).convert("L")
+- string = image.tostring('raw', 'L', 0, -1)
++ string = image.tobytes('raw', 'L', 0, -1)
+ self.loadSubRaw(surface.get_size(), position, string, GL_INTENSITY8)
+ else:
+ if alphaChannel:
diff -Nru fofix-dfsg-3.121/debian/source/lintian-overrides fofix-dfsg-3.121/debian/source/lintian-overrides
--- fofix-dfsg-3.121/debian/source/lintian-overrides 1970-01-01 01:00:00.000000000 +0100
+++ fofix-dfsg-3.121/debian/source/lintian-overrides 2018-10-15 18:23:26.000000000 +0200
@@ -0,0 +1 @@
+source-contains-prebuilt-ms-help-file
Reply to: