/usr/bin/byobu-select-session has bogus #! line

Bug #988471 reported by Barry Warsaw on 2012-04-25
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
byobu (Ubuntu)
Low
Dustin Kirkland 

Bug Description

% head -n 1 /usr/bin/byobu-select-session
#!/usr/bin/env python

While it's fine, preferable even for the development version of byobu-select-session to have the above #! line, it's just asking for trouble to use this in the deployed production version. When installed, byobu-select-session should use #!/usr/bin/python

Dustin Kirkland  (kirkland) wrote :

Hmm, so this bug and https://bugs.launchpad.net/byobu/+bug/996559 are in direct opposition...

What's the right answer here? I have no particular opinion...

Changed in byobu (Ubuntu):
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Dustin Kirkland (kirkland)

On May 10, 2012, at 07:39 PM, Dustin Kirkland wrote:

>Hmm, so this bug and https://bugs.launchpad.net/byobu/+bug/996559 are in
>direct opposition...
>
>What's the right answer here? I have no particular opinion...

Ideally, your development (i.e. vcs trunk) version would use /usr/bin/env but
the distro-installed version would use /usr/bin/python. I'm not particularly
sympathetic to someone who wants to run the distro-installed version of byobu
with a from-source installation of Python. But even in those cases, they can
probably invoke the script explicitly, e.g.

$ /usr/local/bin/python /usr/bin/byobu

Changed in byobu (Ubuntu):
status: In Progress → Fix Released
Daniel Hahler (blueyed) wrote :

The usage of "env" has been removed from the shebang line(s) again.

This causes trouble when there is no /usr/bin/python (e.g. on stripped down system, with Python only in /usr/local or /opt).

What do you think about introducing a BYOBU_PYTHON variable, which could default to /usr/bin/python and would be used to "exec" the Python based byobu scripts, like "byobu-select-session"?

I know that it's possible to create a symlink /usr/bin/python, but that would be gone after an update.

and btw: running byobu directly using Python will result in a syntax error, because bin/byobu itself is a shell script. There are only a few (2?!) scripts written in Python.

Daniel Hahler (blueyed) wrote :

Re-Opening: see previous comment.

While I think that Barry's point to use /usr/bin/python makes sense for the distro package, it should/could use "/usr/bin/env python" for custom installations and the source checkout.

@Barry: do you agree?

Changed in byobu (Ubuntu):
status: Fix Released → Triaged
Dustin Kirkland  (kirkland) wrote :

Sorry, Daniel. I appreciate the bug and the feedback, but this isn't something I'm going to fix upstream in Byobu. Users who want to use a different Python interpreter will need to edit these 2 lines in their custom installations. Sorry.

Changed in byobu (Ubuntu):
status: Triaged → Won't Fix
Changed in byobu (Ubuntu):
status: Won't Fix → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 5.31-0ubuntu1

---------------
byobu (5.31-0ubuntu1) raring; urgency=low

  * configure.ac, Makefile.am, === removed directory
    usr/share/byobu/ec2, usr/lib/byobu/ec2_cost,
    usr/lib/byobu/include/ec2instancespricing.py,
    usr/lib/byobu/include/Makefile.am, usr/share/byobu/ec2/Makefile.am,
    usr/share/byobu/ec2/rates.ap-northeast-1,
    usr/share/byobu/ec2/rates.ap-southeast-1,
    usr/share/byobu/ec2/rates.eu-west-1, usr/share/byobu/ec2/rates.us-
    east-1, usr/share/byobu/ec2/rates.us-west-1,
    usr/share/byobu/ec2/rates.us-west-2:
    - use a smarter algorithm for estimating ec2 cost
    - include ec2instancespricing.py from
      https://github.com/erans/ec2instancespricing
  * debian/postinst, usr/bin/byobu-config, usr/bin/byobu-select-session,
    usr/lib/byobu/include/ec2instancespricing.py: LP: #996559, #988471
    - use env for shebang in development tree
    - fix this up in the postinst
      + seems racy -- there's got to better way of handling this???
  * usr/bin/byobu-launcher-install, usr/bin/byobu-launcher-uninstall:
    - LP: #1002137
    - support fish shell in the installer
  * usr/bin/byobu-select-session:
    - fix python exception
  * usr/bin/byobu, usr/share/byobu/keybindings/f-keys.tmux: LP: #1103449
    - fix regression, re-enable blank window titles in both screen and tmux
 -- Dustin Kirkland <email address hidden> Mon, 28 Jan 2013 02:21:15 -0600

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers