Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Please unblock package python-sorl-thumbnail The changes include a single patch that fixes an FTBFS with tests failing during build. It splits the thumbnail image orientation test into a test for pixel values and a test for EXIF orientation, skipping the last one where EXIF orientation is currently not appropriately changed when an image is rotated (pgmagick and convert backends). Since sorl-thumbnail has been removed from testing because of this FTBFS, the attached debdiff is against the last version which was available in testing. unblock python-sorl-thumbnail/11.12-4 - -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.5-trunk-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlCbUfQACgkQeJ3z1zFMUGbDVQCeKvnfBkwNSQCI8qay1FqA2yXK mhwAn0avbRbWBTOh10mVhzGhqYK22upP =xZy9 -----END PGP SIGNATURE-----
diff -Nru sorl-thumbnail-11.12/debian/changelog sorl-thumbnail-11.12/debian/changelog --- sorl-thumbnail-11.12/debian/changelog 2012-05-23 13:26:56.000000000 +0200 +++ sorl-thumbnail-11.12/debian/changelog 2012-11-07 14:27:35.000000000 +0100 @@ -1,3 +1,11 @@ +sorl-thumbnail (11.12-4) unstable; urgency=low + + * Add patch to fix orientation tests and to skip tests for EXIF + orientation if engine does not support it (Closes: #678777). + * Bump Standards version to 3.9.3. No changes necessary. + + -- Michael Fladischer <fladischermich...@fladi.at> Wed, 07 Nov 2012 08:42:40 +0100 + sorl-thumbnail (11.12-3) unstable; urgency=low * Fix syntax warnings in documentation source (Closes: #655610). diff -Nru sorl-thumbnail-11.12/debian/control sorl-thumbnail-11.12/debian/control --- sorl-thumbnail-11.12/debian/control 2012-01-12 15:55:34.000000000 +0100 +++ sorl-thumbnail-11.12/debian/control 2012-10-25 05:40:22.000000000 +0200 @@ -14,7 +14,7 @@ python-pgmagick, python-setuptools, python-sphinx (>= 1.0.7+dfsg) -Standards-Version: 3.9.2 +Standards-Version: 3.9.3 X-Python-Version: >= 2.5 Homepage: https://github.com/sorl/sorl-thumbnail Vcs-Svn: svn://svn.debian.org/python-modules/packages/sorl-thumbnail/trunk/ diff -Nru sorl-thumbnail-11.12/debian/patches/orientation.patch sorl-thumbnail-11.12/debian/patches/orientation.patch --- sorl-thumbnail-11.12/debian/patches/orientation.patch 1970-01-01 01:00:00.000000000 +0100 +++ sorl-thumbnail-11.12/debian/patches/orientation.patch 2012-10-25 05:40:22.000000000 +0200 @@ -0,0 +1,70 @@ +Description: Split orientation test into pixel and EXIF comparison. + Skip these tests if graphicsmagick or pgmagick is used as the engine. Both + don't synchronize the EXIF orientation with the actual orientation of the + image. +Author: Michael Fladischer <fladischermich...@fladi.at> +Last-Update: 2012-10-19 +Forwarded: no + +--- a/tests/thumbnail_tests/tests.py ++++ b/tests/thumbnail_tests/tests.py +@@ -326,8 +326,8 @@ + m = re.search('Interlace: None', p.stdout.read()) + self.assertEqual(bool(m), True) + +- def test_orientation(self): +- data_dir = pjoin(settings.MEDIA_ROOT, 'data') ++ def test_orientation_pixels(self): ++ data_dir = pjoin(settings.MEDIA_ROOT, 'data_pixels') + shutil.copytree(settings.DATA_ROOT, data_dir) + ref = Image.open(pjoin(data_dir, '1_topleft.jpg')) + top = ref.getpixel((14, 7)) +@@ -340,15 +340,29 @@ + y = sum(y) / len(y) + return abs(x - y) + for name in sorted(os.listdir(data_dir)): +- th = self.backend.get_thumbnail('data/%s' % name, '30x30') ++ th = self.backend.get_thumbnail('data_pixels/%s' % name, '30x30') + im = engine.get_image(th) + self.assertLess(epsilon(top, im.getpixel((14, 7))), 10) + self.assertLess(epsilon(left, im.getpixel((7, 14))), 10) ++ ++ @unittest.skipIf(settings.THUMBNAIL_ENGINE in ( ++ "sorl.thumbnail.engines.pgmagick_engine.Engine", ++ "sorl.thumbnail.engines.convert_engine.Engine", ++ ), ++ "graphicsmagick and pgmagick do not correct the orientation in the EXIF tag") ++ def test_orientation_exif(self): ++ data_dir = pjoin(settings.MEDIA_ROOT, 'data_exif') ++ shutil.copytree(settings.DATA_ROOT, data_dir) ++ engine = PILEngine() ++ for name in sorted(os.listdir(data_dir)): ++ th = self.backend.get_thumbnail('data_exif/%s' % name, '30x30') ++ im = engine.get_image(th) + exif = im._getexif() + if exif: + self.assertEqual(exif.get(0x0112), 1) + + ++ + class TemplateTestCaseB(unittest.TestCase): + def tearDown(self): + try: +@@ -534,7 +548,7 @@ + im1 = Item.objects.get(image='100x100.jpg').image + im2 = Item.objects.get(image='500x500.jpg').image + default.kvstore.get_or_set(ImageFile(im1)) +- # exists in kvstore and in storage ++ # exists in kvstore and in storage + self.assertTrue(bool(default.kvstore.get(ImageFile(im1)))) + self.assertTrue(ImageFile(im1).exists()) + # delete +@@ -543,7 +557,7 @@ + self.assertFalse(ImageFile(im1).exists()) + + default.kvstore.get_or_set(ImageFile(im2)) +- # exists in kvstore and in storage ++ # exists in kvstore and in storage + self.assertTrue(bool(default.kvstore.get(ImageFile(im2)))) + self.assertTrue(ImageFile(im2).exists()) + # delete diff -Nru sorl-thumbnail-11.12/debian/patches/series sorl-thumbnail-11.12/debian/patches/series --- sorl-thumbnail-11.12/debian/patches/series 2012-05-23 13:26:56.000000000 +0200 +++ sorl-thumbnail-11.12/debian/patches/series 2012-10-25 05:40:22.000000000 +0200 @@ -1,2 +1,3 @@ disable_http_tests.patch fix_sphinx_warnings.patch +orientation.patch