vronp: You appear to be running into a configuration issue with Xen; I'm
fairly confident that it's unrelated to this bug.

I've managed to reproduce this on Jaunty. It looks like the exception
you're seeing is actually being raised in an exception handling clause,
so it's squashing the actual error. If you just try to run `import
curses; stdscr=curses.initscr()` in a Python 2.5 shell, you get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/curses/__init__.py", line 30, in initscr
    setupterm(term=_os.environ.get("TERM", "unknown"),
NameError: global name '_os' is not defined

This appears to be a bug in the python2.5 packaging, and not in Xen.
Specifically, the patch debian/patches/curses-init.dpatch is incomplete.

** Changed in: xen-3.3 (Ubuntu)
       Status: New => Invalid

** Also affects: python2.5 (Ubuntu)
   Importance: Undecided
       Status: New

** Summary changed:

- pygrub broken in xen-3.3 under Ubuntu 9.04
+ incomplete patch to curses module in python2.5

** Description changed:

- I believe this is an issue with the python 2.5 to 2.6 change and may
- indicate other bugs.  Also, pygrub works fine in Ubuntu 8.10 but not at
- all in Ubuntu 9.04 so this is clearly a severe regression and thus
- qualifies for a stable release update.
+ The patch debian/patches/curses-init.dpatch introduced in python2.5
+ 2.5.4-1ubuntu4 is incomplete, as it doesn't include two imports that are
+ necessary for the patch to work. This means that curses.initscr() errors
+ out:
  
- ---
- pygrub with python 2.6 (which is how it ships):
- 
+ r...@jaunty-test:~/src/python2.5-2.5.4# python2.5
+ Python 2.5.4 (r254:67916, Apr  4 2009, 17:56:17) 
+ [GCC 4.3.3] on linux2
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> import curses
+ >>> curses.initscr()
  Traceback (most recent call last):
-   File "/usr/local/bin/pygrub", line 26, in <module>
-     import fsimage
- ImportError: No module named fsimage
- 
- The python-xen-3.3 package provides /usr/lib/python2.5/site-
- packages/fsimage.so but not a module for python 2.6.  So one way to
- potentially fix this bug is to provide a fsimage module for python 2.6.
- 
- ---
- pygrub with python 2.5 (since the fsimage module is present):
- 
- WARNING:root:Unknown image directive quiet
- WARNING:root:Unknown image directive quiet
- WARNING:root:Unknown image directive quiet
- WARNING:root:Unknown image directive quiet
- WARNING:root:Unknown image directive quiet
- WARNING:root:Unknown image directive quiet
- Traceback (most recent call last):
-   File "/usr/local/bin/pygrub", line 660, in <module>
-     chosencfg = run_grub(file, entry, fs)
-   File "/usr/local/bin/pygrub", line 513, in run_grub
-     curses.wrapper(run_main)
-   File "/usr/lib/python2.5/curses/wrapper.py", line 47, in wrapper
-     stdscr.keypad(0)
- UnboundLocalError: local variable 'stdscr' referenced before assignment
- 
- This looks like a bug in the python curses library but I haven't
- investigated in depth.
+   File "<stdin>", line 1, in <module>
+   File "/usr/lib/python2.5/curses/__init__.py", line 30, in initscr
+     setupterm(term=_os.environ.get("TERM", "unknown"),
+ NameError: global name '_os' is not defined

** Tags removed: server virtualization xen

-- 
incomplete patch to curses module in python2.5
https://bugs.launchpad.net/bugs/395321
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to