[Bug 307345] [NEW] Python upgrade breaks eyeD3

Tim Heaney theaney at gmail.com
Fri Dec 12 03:10:10 UTC 2008


Public bug reported:

Binary package hint: eyed3


I built Python 2.6.1 from source and installed it in /usr/local/bin/python. The original Python is still in /usr/bin/python.

  tim at calvin:~$ /usr/bin/python -V
  Python 2.5.2
  tim at calvin:~$ /usr/local/bin/python -V
  Python 2.6.1

This broke the eyeD3 command-line program, which failed with

  tim at calvin:~/Music/JuneStar$ eyeD3 released.mp3 
  Traceback (most recent call last):
    File "/usr/bin/eyeD3", line 32, in <module>
      from eyeD3 import *;
  ImportError: No module named eyeD3

That's because /usr/bin/eyeD3 has a shebang line of

  #!/usr/bin/env python

and, of course, that's now finding the wrong version of Python

  tim at calvin:~$ /usr/bin/env python -V
  Python 2.6.1

Calling with the correct version of Python fixes it.

  tim at calvin:~/Music/JuneStar$ /usr/bin/python /usr/bin/eyeD3
released.mp3

  released.mp3	[ 4.21 MB ]
  -------------------------------------------------------------------------------
  Time: 04:36	MPEG1, Layer III	[ 128 kb/s @ 44100 Hz - Joint stereo ]
  -------------------------------------------------------------------------------
  ID3 v2.3:
  title: Released		artist: Andrew Grimm
  album: Recordings		year: None
  track: 		genre: Folk (id 80)

Thus changing the shebang line of /usr/bin/eyeD3 to /usr/bin/python
fixes it.

This is essentially the same issue as #199134

  https://bugs.launchpad.net/system-tools-backends/+bug/199134

but not as severe, since it's an user application that is broken, rather
than a system tool. And it's a matter of missing dependencies, not a
broken interpreter as freedesktop.org so unkindly summarized the
upstream version of that bug

  http://bugs.freedesktop.org/show_bug.cgi?id=16642;

I reported this issue to the developer of eyeD3 back in October when it
first happened to me (with Python 2.6, not 2.6.1), but I could not seem
to convince him that it's a mistake to use env this way in system
scripts.

But it's not really an issue with eyeD3 per se, but with the .deb that
installs it. Shouldn't it re-write the shebang line to /usr/bin/python?
Indeed, on my system all of the following are bugs waiting to happen:

  /usr/bin/getnonfreefonts       #!/usr/bin/env perl
  /usr/bin/getnonfreefonts-sys   #!/usr/bin/env perl
  /usr/bin/gtk-builder-convert   #!/usr/bin/env python
  /usr/bin/gtkcdlabel.py         #!/usr/bin/env python
  /usr/bin/hp-align              #!/usr/bin/env python
  /usr/bin/hp-check              #!/usr/bin/env python
  /usr/bin/hp-clean              #!/usr/bin/env python
  /usr/bin/hp-colorcal           #!/usr/bin/env python
  /usr/bin/hp-fab                #!/usr/bin/env python
  /usr/bin/hp-firmware           #!/usr/bin/env python
  /usr/bin/hp-info               #!/usr/bin/env python
  /usr/bin/hp-levels             #!/usr/bin/env python
  /usr/bin/hp-makecopies         #!/usr/bin/env python
  /usr/bin/hp-makeuri            #!/usr/bin/env python
  /usr/bin/hp-print              #!/usr/bin/env python
  /usr/bin/hp-probe              #!/usr/bin/env python
  /usr/bin/hp-scan               #!/usr/bin/env python
  /usr/bin/hp-sendfax            #!/usr/bin/env python
  /usr/bin/hp-setup              #!/usr/bin/env python
  /usr/bin/hp-systray            #!/usr/bin/env python
  /usr/bin/hp-testpage           #!/usr/bin/env python
  /usr/bin/hp-timedate           #!/usr/bin/env python
  /usr/bin/hp-toolbox            #!/usr/bin/env python
  /usr/bin/hp-unload             #!/usr/bin/env python
  /usr/bin/invest-chart          #!/usr/bin/env python
  /usr/bin/perltex               #! /usr/bin/env perl
  /usr/bin/rss-glx_install       #!/usr/bin/env perl
  /usr/bin/texdoctk              #!/usr/bin/env perl
  /usr/bin/tomboy                #!/usr/bin/env bash
  /usr/bin/tomboy-panel          #!/usr/bin/env bash

In fact, I guess in my case, the Python ones have already happened.
Let's see

  tim at calvin:~$ /usr/bin/gtkcdlabel.py
  python-id3 not found - diabling MP3/ID3 support
  python-cddb not found - diabling CDDB support

Yup, Gtkcdlabel is now broken for the same reason (missing
dependencies).

The Debian developers *prefer* /usr/bin/python and *advise* against
/usr/bin/env

  http://www.debian.org/doc/packaging-manuals/python-policy/ch-
python.html#s-interpreter_loc

Perhaps I should lobby them for stronger terms.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 8.10
Package: eyed3 0.6.16 [modified: usr/bin/eyeD3]
PackageArchitecture: all
ProcEnviron:
 PATH=/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/username/bin:/home/username/sh:/home/username/perl:/home/username/python:/home/username/ruby:.
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: eyed3
Uname: Linux 2.6.27-9-generic x86_64

** Affects: eyed3 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug

-- 
Python upgrade breaks eyeD3
https://bugs.launchpad.net/bugs/307345
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list