pastebinit ignores PREFIX,

Bug #799044 reported by Eitan Adler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pastebinit
New
Medium
Unassigned

Bug Description

1) Pastebinit use an exact path of #!/usr/bin/python which requires patching on systems where python may exist in a different location.
It is preferable to use #!/usr/bin/env python instead

2) Pastebinit looks for its configuration files under /etc which is not PREFIX safe. It should look under /usr/local/etc as well.

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

Thank you for your report.

I've pushed the requested change to the shebang in r124. I'll let Stéphane handle the second request.

Changed in pastebinit:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Rolf Leggewie (r0lf) wrote :

My goodness, bzr really sucks! Make that r127.

Changed in pastebinit:
status: In Progress → Fix Committed
Changed in pastebinit:
status: Fix Committed → Fix Released
Revision history for this message
Eitan Adler (eitan) wrote :

Awesome, Thanks!

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

FYI, this change will be reverted with the next release of pastebinit. Have a look at bug 988468 for more information.

Revision history for this message
Eitan Adler (eitan) wrote : Re: [Bug 799044] Re: pastebinit ignores PREFIX,

The resolution of the referenced bug is wrong :(
This change will break pastebinit on a very large number of systems.
On Jan 17, 2014 3:16 AM, "Rolf Leggewie" <email address hidden> wrote:

> FYI, this change will be reverted with the next release of pastebinit.
> Have a look at bug 988468 for more information.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/799044
>
> Title:
> pastebinit ignores PREFIX,
>
> Status in Pastebin it !!!:
> Fix Released
>
> Bug description:
> 1) Pastebinit use an exact path of #!/usr/bin/python which requires
> patching on systems where python may exist in a different location.
> It is preferable to use #!/usr/bin/env python instead
>
> 2) Pastebinit looks for its configuration files under /etc which is
> not PREFIX safe. It should look under /usr/local/etc as well.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pastebinit/+bug/799044/+subscriptions
>

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

If that is so, I think you should elaborate and possibly suggest a better solution. The previous solution was wrong and I guess there is hardly a better reference than Barry Warsaw. From what I see so, anything under /usr/local is outside the scope of the distro responsibility. If we can support that without breaking core distro functionality, I am open to it. Again, if you can suggest a good way to handle your desired functionality, go right ahead. I'm all ears.

Revision history for this message
Eitan Adler (eitan) wrote :

OK.

Sorry for the delay, I was away from my computer.

There are a few issues here.
1) Not all operating systems ship python in /usr/bin at all. In
particular FreeBSD, OpenBSD, and I'm sure others use /usr/local/bin as
the location for the 'python' binary.

2) Some operating systems ship old or bad versions of python in
/usr/bin (OSX for example) so users may install a new or different
version under a different prefix. For example OSX users might have a
copy of python in /opt/local/bin

3) Users that modify their PATH want programs to follow this change.
It is painful to find that the reason that one's program is breaking
is because PATH is being ignored.

4) Just because /usr/bin/python works now does not mean it will work
in the future.

On Sat, Jan 18, 2014 at 10:51 PM, Rolf Leggewie
<email address hidden> wrote:
> If that is so, I think you should elaborate and possibly suggest a
> better solution. The previous solution was wrong and I guess there is
> hardly a better reference than Barry Warsaw. From what I see so,
> anything under /usr/local is outside the scope of the distro
> responsibility. If we can support that without breaking core distro
> functionality, I am open to it. Again, if you can suggest a good way to
> handle your desired functionality, go right ahead. I'm all ears.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/799044
>
> Title:
> pastebinit ignores PREFIX,
>
> Status in Pastebin it !!!:
> Fix Released
>
> Bug description:
> 1) Pastebinit use an exact path of #!/usr/bin/python which requires patching on systems where python may exist in a different location.
> It is preferable to use #!/usr/bin/env python instead
>
> 2) Pastebinit looks for its configuration files under /etc which is
> not PREFIX safe. It should look under /usr/local/etc as well.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pastebinit/+bug/799044/+subscriptions

--
Eitan Adler

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

reopening for further discussion, sorry about the long delay.

Changed in pastebinit:
status: Fix Released → New
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.