Python interpreter should be hard-coded in /usr/bin/hp-*

Bug #912617 reported by David Warde-Farley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hplip (Ubuntu)
New
Undecided
Unassigned

Bug Description

Currently (as of 11.04, and I suspect in 11.10), hplip will potentially break if you have a non-system Python executable on your PATH, e.g. using virtualenv or a custom-built Python. As per the Debian Python Policy (I can't find a similarly thorough document for Ubuntu),

> The preferred specification for the Python interpreter is /usr/bin/python or /usr/bin/pythonX.Y. This ensures that a Debian installation of python is used and all dependencies on additional python modules are met.

> Maintainers should not override the Debian Python interpreter using /usr/bin/env python or /usr/bin/env pythonX.Y. This is not advisable as it bypasses Debian's dependency checking and makes the package vulnerable to incomplete local installations of python.

I think this is reasonable, and also supported by the majority of the Python scripts in my /usr/bin directory.

dwf@barricade:~$ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04
dwf@barricade:~$ apt-cache policy hplip
hplip:
  Installed: 3.11.1-2ubuntu2
  Candidate: 3.11.1-2ubuntu2
  Version table:
 *** 3.11.1-2ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status
dwf@barricade:~$ grep '#!/usr/bin/env python' /usr/bin/hp-* |cut -d':' -f 1 |xargs dpkg -S
hplip: /usr/bin/hp-align
hplip: /usr/bin/hp-check
hplip: /usr/bin/hp-clean
hplip: /usr/bin/hp-colorcal
hplip: /usr/bin/hp-firmware
hplip: /usr/bin/hp-hpdio
hplip: /usr/bin/hp-info
hplip: /usr/bin/hp-levels
hplip: /usr/bin/hp-makeuri
hplip: /usr/bin/hp-pkservice
hplip: /usr/bin/hp-plugin
hplip: /usr/bin/hp-probe
hplip: /usr/bin/hp-query
hplip: /usr/bin/hp-scan
hplip: /usr/bin/hp-setup
hplip: /usr/bin/hp-testpage
hplip: /usr/bin/hp-timedate
hplip: /usr/bin/hp-unload

Revision history for this message
David Warde-Farley (david-warde-farley) wrote :

This affects several more packages, so I've created a bug at the distribution level, #912625.

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.