Package: python-ow Version: 2.9p5-1 Severity: grave Trying to import ow results in
pietro@debiousci:~$ python -c "import ow" Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/ow/__init__.py", line 37, in <module> __version__ = _OW.version( ) + '-%s' % '$Id$'.split( )[ 2 ] IndexError: list index out of range The line which gives an error... couldn't really do otherwise. The problem comes from the fact that while in previous upstream versions that line looked like __version__ = _OW.version( ) + '-%s' % '$Id: __init__.py,v 1.19 2013/03/24 01:23:30 alfille Exp $'.split( )[ 2 ] , this was changed probably through an automatic replacement which broke owpython in version 2.9p5. The same applies to ownet. Attached is a patch which fixes both. Notice that both are also fixed upstream in version 2.9p7 (exactly in the same way as my patch). So the optimal fix would be to simply package it. But if this can't be done in reasonable time, I could (push 2.9p5-1.1 to collab-maint, and) try to get a new NMU sponsored with my simple patch applied. -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (650, 'testing'), (600, 'unstable'), (600, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16-2-amd64 (SMP w/2 CPU cores) Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-ow depends on: ii libc6 2.19-11 ii libow-2.9-5 2.9p5-1.1 ii python 2.7.8-1 python-ow recommends no packages. python-ow suggests no packages. -- no debconf information
commit 64222f5788c664c15bb0f980ed170be1405c308c Author: Pietro Battiston <m...@pietrobattiston.it> Date: Tue Oct 14 14:32:29 2014 +0200 Only return the OW version diff --git a/debian/patches/only-return-the-OW-version.patch b/debian/patches/only-return-the-OW-version.patch new file mode 100644 index 0000000..3c040be --- /dev/null +++ b/debian/patches/only-return-the-OW-version.patch @@ -0,0 +1,25 @@ +From: Pietro Battiston <m...@pietrobattiston.it> +Date: Tue, 14 Oct 2014 14:29:13 +0200 +Subject: Only return the OW version. + +The python files are currently installed without replacing some +placeholders such as "$Id$". As a consequence, the parsing ("split()") +of the version number fails. This horrible hack simply disables it, +until the real fix is implemented. +--- + module/swig/python/ow/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/module/swig/python/ow/__init__.py b/module/swig/python/ow/__init__.py +index 0ed9dfd..84bc115 100644 +--- a/module/swig/python/ow/__init__.py ++++ b/module/swig/python/ow/__init__.py +@@ -34,7 +34,7 @@ from ow import _OW + + __author__ = 'Peter Kropf' + __email__ = 'pkr...@gmail.com' +-__version__ = _OW.version( ) + '-%s' % '$Id$'.split( )[ 2 ] ++__version__ = _OW.version( ) + + + # diff --git a/debian/patches/series b/debian/patches/series index 494f101..f0fe969 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,3 +7,4 @@ deb-specific_python-install.patch deb_specific__owfs-use-config.patch for-upstream_fix-ABI.patch for-upstream_owexist-manpage.patch +only-return-the-OW-version.patch