Bug 734171 - python traceback when importing snack (frpm python-newt package)
python traceback when importing snack (frpm python-newt package)
Classification: openSUSE
Product: openSUSE 12.1
Classification: openSUSE
Component: Other
x86-64 SUSE Other
: P3 - Medium : Critical (vote)
: ---
Assigned To: Lars Vogdt
E-mail List
Depends on:
  Show dependency treegraph
Reported: 2011-12-01 15:08 UTC by Joerg Steffens
Modified: 2012-02-21 15:57 UTC (History)
2 users (show)

See Also:
Found By: Community User
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---

fix for this bug (dirty) (627 bytes, patch)
2011-12-02 09:30 UTC, Joerg Steffens
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Steffens 2011-12-01 15:08:48 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0

> python 
Python 2.7.2 (default, Aug 19 2011, 20:41:43) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import snack
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/snack.py", line 42, in <module>
    import _snack
ImportError: No module named _snack

Reproducible: Always

Steps to Reproduce:
1. zypper in python-newt
2. python
3.   import snack

Actual Results:  

works with SLES11
fails on openSUSE 12.1
Comment 1 Joerg Steffens 2011-12-02 09:30:28 UTC
Created attachment 465546 [details]
fix for this bug (dirty)

the cause for this problem is, that _snackmodule.so isn't included in the RPM anymore.
This has 2 reasons:
- compile option -fPIC is missing
- the Makefile tries to handle multiple python versions, but tries to copy _snackmodule.so from a non existing directory. This should be fixed in the Makefile. As a quick solution, I created a workaround in the spec file
Comment 2 Lars Vogdt 2012-01-11 16:48:32 UTC
Thanks for the report and also the proposed fix!

Let me see if we can find a smoother solution for the missing _snackmodule.so file...
Comment 3 Lars Vogdt 2012-02-01 10:49:00 UTC
As upstream fixed the Makefile problem in the next version, the only needed change was to enable fPIC.

New package 0.52.14 works here for me. Can you please give the package in devel:libraries:c_c++ a try?

They should be visible in a few minutes here: http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_12.1/
Comment 4 Lars Vogdt 2012-02-08 10:30:36 UTC
Hi Maintenance!

Even if I got no response from the original customer, the problem seems to be fixed with the new package. Comparing the newt package in 12.1 and the one which is currently building in devel:libraries:c_c++ I see the following changes:

+Wed Feb  1 10:23:33 UTC 2012 - lars@linux-schulserver.de
+- update to 0.52.14:
+  + fix returning strings in whiptail and whiptcl (rh#752818)
+  + fix configure to work with multiple python versions (rh#737998)
+- removed newt-0.52.13-python_version.patch : fixed upstream
+- compile with fPIC - fixes problems with _snackmodule.so
+  thanks to Joerg Steffens (bnc#734171)
+- newt-doc recommends the main package as the examples need it
+- added newt-0.52.14-incorrect-fsf-address.patch
+Sun Jan 29 19:32:51 UTC 2012 - jengelh@medozas.de
+- Remove redundant tags/sections per specfile guideline suggestions

Beside the additional recommends for the doc package, I there are no incompatible changes between the release 0.52.13 (openSUSE 12.1) and the new 0.52.14.

From my point of view, I like to request releasing the bug as fix update for openSUSE 12.1, as without the fix the python-newt subpackage is unusable.

Please decide.
Comment 5 Ludwig Nussel 2012-02-08 10:41:37 UTC
newt-0.52.14-incorrect-fsf-address.patch is wrong. that one needs to be fixed upstream rather than in the package. Other than that go ahead.
Comment 6 Bardo Wolf 2012-02-08 14:02:37 UTC
python-newt-0.52.14-22.2.x86_64 and newt-0.52.14-22.2.i586

fixes the problem installing opsi40 on  openSUSE 12.1



Comment 7 Joerg Steffens 2012-02-08 15:10:27 UTC
The version from 

works for me.
Comment 11 Lars Vogdt 2012-02-21 15:57:29 UTC
Packages are in http://download.opensuse.org/update/12.1-test/ now - closing as fixed. (The move to the official update repo will be done later...)