python3 fails to install (postinst has invalid shebang line)

Bug #599208 reported by Anders Kaseorg
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
python3-defaults (Ubuntu)
Fix Released
High
Scott Kitterman

Bug Description

Setting up python3 (3.1.2-2ubuntu1) ...
dpkg (subprocess): unable to execute installed post-installation script (/var/lib/dpkg/info/python3.postinst): Exec format error
dpkg: error processing python3 (--configure):
 subprocess installed post-installation script returned error exit status 2

Tags: patch
Revision history for this message
Anders Kaseorg (andersk) wrote :
tags: added: patch
Revision history for this message
Michael Bienia (geser) wrote :

After fixing the postinst, I got the following output but the package configuration succeeded (dpkg lists it as installed):

$ sudo dpkg --configure --pending
Setting up python3 (3.1.2-2ubuntu1) ...
Traceback (most recent call last):
  File "/usr/lib/python3.1/runpy.py", line 128, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python3.1/runpy.py", line 34, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.1/py_compile.py", line 185, in <module>
    sys.exit(main())
  File "/usr/lib/python3.1/py_compile.py", line 177, in main
    compile(filename, doraise=True)
  File "/usr/lib/python3.1/py_compile.py", line 131, in compile
    encoding = read_encoding(file, "utf-8")
  File "/usr/lib/python3.1/py_compile.py", line 83, in read_encoding
    f = open(file, "rb")
IOError: [Errno 2] No such file or directory: '-'

Changed in python3-defaults (Ubuntu):
assignee: nobody → Scott Kitterman (kitterman)
importance: Undecided → High
status: New → In Progress
Changed in python3-defaults (Ubuntu):
milestone: none → maverick-alpha-2
Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 599208] [NEW] python3 fails to install (postinst has invalid shebang line)

python3.1 needs updating to. Working on them both.

Revision history for this message
Scott Kitterman (kitterman) wrote :

python3.1 and python3-defaults are both uploaded. Build queues are huge today, so it will likely be a while before the packages are built. The python3-defaults update fixes the shebang issue and correctly depends on the newer python3.1, so you won't be able to install the new python3 package without the new python3.1.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3-defaults - 3.1.2-2ubuntu2

---------------
python3-defaults (3.1.2-2ubuntu2) maverick; urgency=low

  * Fix shebang in debian/python3.postinst (LP: #599208)
  * Bump PREVVER to 3.1.2-3~ for support for stdin in py_compile.py
 -- Scott Kitterman <email address hidden> Mon, 28 Jun 2010 09:03:36 -0400

Changed in python3-defaults (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

@Anders Kaseorg: Thank you for your work on the patch, unfortunately by the time I saw this bug, I had that fixed already.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.