/usr/bin/pastebinit has bogus #! line

Bug #988468 reported by Barry Warsaw
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pastebinit
Fix Released
Undecided
Stéphane Graber
pastebinit (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

% head -n 1 /usr/bin/pastebinit
#!/usr/bin/env python

While it's fine, preferable even, for the development version of pastebinit to have a #! line of /usr/bin/env python, it is just asking for breakage for the deployed production version to use this. Instead, when deployed, the line should be #!/usr/bin/python

Revision history for this message
Stéphane Graber (stgraber) wrote :

Adding a task against the project just so we keep a record of it.
Marking as Won't fix.

Talking to Barry on IRC, the consensus is that "/usr/bin/env python" is fine for the upstream code but "/usr/bin/python" should be used for the package script, having at least Debian/Ubuntu carry a distro patch for this.

I'll let Rolf decide whether or not he wants to do that.
https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/988391/comments/1 contains some more details about this.

Changed in pastebinit (Ubuntu):
status: New → Triaged
Changed in pastebinit:
status: New → Won't Fix
Changed in pastebinit (Ubuntu):
importance: Undecided → Low
Changed in pastebinit:
status: Won't Fix → Opinion
Revision history for this message
Barry Warsaw (barry) wrote : Re: [Bug 988468] Re: /usr/bin/pastebinit has bogus #! line

On Apr 25, 2012, at 08:08 PM, Stéphane Graber wrote:

>Talking to Barry on IRC, the consensus is that "/usr/bin/env python" is
>fine for the upstream code but "/usr/bin/python" should be used for the
>package script, having at least Debian/Ubuntu carry a distro patch for
>this.

Note that I'm pushing again in debian-python to have dh_python{2,3} fix the
shebang lines automatically. Debian Python policy now strongly discourages
/usr/bin/env, but also I think the helpers should help you! (I don't know
what helper if any pastebinit uses.)

Revision history for this message
Rolf Leggewie (r0lf) wrote :

I'm sorry for the delay in responding. The shebang was specifically changed in r127 as requested in bug 799044. If that was a mistake, I'm OK to revert it or otherwise amend it.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

I'm all for simplicity and I understand that "#!/usr/bin/env python" isn't such a great choice for the distro package. Are we going to switch bzr back to "/usr/bin/python" or how are we going to make the change at release time?

Revision history for this message
Barry Warsaw (barry) wrote :

On Jun 02, 2012, at 06:19 AM, Rolf Leggewie wrote:

>I'm all for simplicity and I understand that "#!/usr/bin/env python"
>isn't such a great choice for the distro package. Are we going to
>switch bzr back to "/usr/bin/python" or how are we going to make the
>change at release time?

There are several ways to handle this, depending on which release you care
about. For Debian/Ubuntu or other platforms, the build scripts could make the
appropriate change. There's even been talk within the Debian Python group
about adding this functionality to the standard helpers.

My current favorite way is to use distribute's entry_points:console_scripts
key to do this when `python setup.py install` is invoked.

Rolf Leggewie (r0lf)
Changed in pastebinit (Ubuntu):
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Set the upstream code to use #!/usr/bin/python3 now.

Changed in pastebinit:
status: Opinion → Fix Committed
Changed in pastebinit (Ubuntu):
assignee: Stéphane Graber (stgraber) → nobody
Revision history for this message
Rolf Leggewie (r0lf) wrote :

I think that's a terrible idea since it will break all systems without python3

Revision history for this message
Stéphane Graber (stgraber) wrote :

That's kind of the whole idea of switching upstream to python3, I expect to drop python2 support upstream within the next year.

python3 has been around for long enough now that upstream projects can finally switch to it.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

my mistake. I assumed a python package 2.x had python 2 which apparently is not the case. I'm still not sure hard-coding a version is such a great idea, but you would know better than me.

Changed in pastebinit:
assignee: nobody → Stéphane Graber (stgraber)
Changed in pastebinit:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pastebinit - 1.4-2ubuntu1

---------------
pastebinit (1.4-2ubuntu1) trusty; urgency=medium

  * Merge from Debian unstable. Remaining changes:
    - Don't build-depend on python-support.

pastebinit (1.4-2) unstable; urgency=low

  * patches:
    ~ update upstream to r205. Fix unicode problem. LP: #1270359
      This essentially gives us upstream release 1.4.1
    ~ increase timeout to 15s to account for bad networks
  * watch: only check for 2-level (major.minor) upstream releases
  * drop preinst script as obsolete

pastebinit (1.4-1) unstable; urgency=low

  [ Bart Martens ]
  * update watch file

  [ Rolf Leggewie ]
  * new upstream release 1.4
    - upstream bugfixes
      ~ crash in create_connection(). LP: #1032221
      ~ point shebang to python3. LP: #988468
      ~ allow calling pastebin by basename. Closes: #705979, LP: #977331
      ~ allow pasting several files at once. Closes: #662242
    - control: bump python to python3 in run-time dependencies
               remove python-configobj from run-time dependencies
    - drop all debian-patches as obsolete
  * control:
    - drop obsolete DMUA field
    - update to standard version 3.9.5. No further changes.
  * copyright: update upstream and my copyright to 2014
 -- Stephane Graber <email address hidden> Thu, 23 Jan 2014 21:52:07 -0500

Changed in pastebinit (Ubuntu):
status: Triaged → Fix Released
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.