Package: python-mpop Version: 1.5.0-1 Severity: minor Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu bionic ubuntu-patch autopkgtest
Dear maintainers, With python-mpop 1.5.0-1, while the autopkgtests continue to pass fine on amd64 as seen at <https://ci.debian.net/packages/p/python-mpop/>, but an added upstream test makes assumptions about the python hash() function that don't hold on 32-bit archs, as seen in Ubuntu at <http://autopkgtest.ubuntu.com/packages/p/python-mpop/bionic/i386>. Since there doesn't seem to be any reason to care that the cache filename schema is consistent across architectures, and in any case this wasn't a blocker for this version of python-mpop to reach testing, I think the test should be fixed to be portable to 32-bit architectures. The attached patch achieves this, and has been uploaded to Ubuntu. Please consider applying this change in Debian as well. -- 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/ slanga...@ubuntu.com vor...@debian.org
diff -Nru python-mpop-1.5.0/debian/patches/series python-mpop-1.5.0/debian/patches/series --- python-mpop-1.5.0/debian/patches/series 2017-03-13 10:28:27.000000000 -0700 +++ python-mpop-1.5.0/debian/patches/series 2018-03-17 00:02:10.000000000 -0700 @@ -3,3 +3,4 @@ 0003-fix-missing-trollsift.patch 0004-Include-test-sub-package.patch 0005-Disable-TestEmptyImage.test_pil_image.patch +wordsize-safe-tests.patch diff -Nru python-mpop-1.5.0/debian/patches/wordsize-safe-tests.patch python-mpop-1.5.0/debian/patches/wordsize-safe-tests.patch --- python-mpop-1.5.0/debian/patches/wordsize-safe-tests.patch 1969-12-31 16:00:00.000000000 -0800 +++ python-mpop-1.5.0/debian/patches/wordsize-safe-tests.patch 2018-03-17 00:04:43.000000000 -0700 @@ -0,0 +1,26 @@ +Description: fix tests to work on 32-bit archs + The python hash() function doesn't return the same results on 64-bit and + 32-bit archs, so don't make incorrect assumptions about its output in a + test when used for something as inconsequential as predictable cache file + names. +Author: Steve Langasek <steve.langa...@ubuntu.com> +Index: python-mpop-1.5.0/mpop/tests/test_projector.py +=================================================================== +--- python-mpop-1.5.0.orig/mpop/tests/test_projector.py ++++ python-mpop-1.5.0/mpop/tests/test_projector.py +@@ -259,8 +259,13 @@ + res = mpop.projector.get_precompute_cache_fname('in_id', 'out_id', + 'in_area', 'out_area', + 'mode', 'proj_dir') +- cor_res = "proj_dir/in_id2out_id_-" + \ +- "6296787761359943868to8984161303220364208_mode.npz" ++ if sys.maxsize > 2**32: ++ cor_res = "proj_dir/in_id2out_id_-" + \ ++ "6296787761359943868to8984161303220364208_mode.npz" ++ else: ++ cor_res = "proj_dir/in_id2out_id_-" + \ ++ "1843591356to-347954256_mode.npz" ++ + self.assertTrue(res == cor_res) + + @patch.object(mpop.projector, 'get_area_def')
_______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel