Source: graphite2 Version: 1.3.0-1 Severity: important Tags: patch Hi,
graphite2 1.3.0-1 fails to build on kFreeBSD [1][2] and Hurd [3]. The problem is that tests/graphite.py does not have any library item for these platforms registered in the grfiles dictionary, so the script will fail with a KeyError exception. The fix, which is suitable for upstream (so please do forward it), is to slightly rework the logic for knowing the library name on the current platform: since there will be far more platforms with the name libgraphite2.so (Linux, kFreeBSD, Hurd, and any other BSD platform for sure), then fallback to that name for missing items in the grfiles dictionary. Hence, that dictionary contains now only platforms where the library name is not libgraphite2.so, and the linux2 mapping is no more needed. Patch attached for this. [1] https://buildd.debian.org/status/fetch.php?pkg=graphite2&arch=kfreebsd-amd64&ver=1.3.0-1&stamp=1439034142 [2] https://buildd.debian.org/status/fetch.php?pkg=graphite2&arch=kfreebsd-i386&ver=1.3.0-1&stamp=1439034476 [3] https://buildd.debian.org/status/fetch.php?pkg=graphite2&arch=hurd-i386&ver=1.3.0-1&stamp=1439070777 Thanks, -- Pino
--- a/tests/graphite.py +++ b/tests/graphite.py @@ -30,9 +30,9 @@ else : #basedir = os.path.join(os.path.dirname(__file__), '..', '..', 'build', 'src') basedirs = [os.path.join('..', '..'), os.path.join('..'), os.path.join('..','build')] +# systems with a library filename different than libgraphite2.so grfiles = { 'darwin' : 'libgraphite2.dylib', - 'linux2' : 'libgraphite2.so', 'win32' : 'graphite2.dll', 'win64' : 'graphite2-x64.dll' } @@ -40,7 +40,10 @@ gr2 = None if sys.platform == 'win32' and sys.maxsize > (1 << 32) : grfile = grfiles['win64'] else : - grfile = grfiles[sys.platform] + try : + grfile = grfiles[sys.platform] + except KeyError : + grfile = 'libgraphite2.so' for b in (os.path.join(b,'src',c) for b in basedirs for c in ('', 'Debug', 'Release', 'DebWithRelInfo', 'MinSizeRel')): testfile = os.path.join(b, grfile) print "Trying " + testfile