r2e runs python from $PATH

Bug #191821 reported by Justin Mason on 2008-02-14
6
Affects Status Importance Assigned to Milestone
rss2email (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: rss2email

hi there --

after apt-get installing rss2email on Gutsy, when I run /usr/bin/r2e, I get this:

: jm 151...; r2e new <email address hidden>
Traceback (most recent call last):
  File "/usr/share/rss2email/rss2email.py", line 229, in <module>
    import feedparser
ImportError: No module named feedparser

This is because I have a custom build of python in /usr/local/bin, $PATH
contains /usr/local/bin before /usr/bin, and my custom build doesn't have
feedparser installed.

To fix:

--- r2e.bak 2008-02-14 12:57:03.000000000 +0000
+++ /usr/bin/r2e 2008-02-14 12:57:52.000000000 +0000
@@ -13,4 +13,7 @@
        mkdir -p "$dir"
 fi
 cd "$dir"
+# use /usr/bin/python if possible, so that apt dependency on feedparser will work
+PATH=/usr/bin:$PATH
+export PATH
 exec python /usr/share/rss2email/rss2email.py feeds.dat $*

Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 or 9.04?

Changed in rss2email:
importance: Undecided → Low
status: New → Incomplete
Lindsey Smith (lindsey-smith) wrote :

Unless I misunderstand, why would we patch a package to fix a path issue for one user's custom configuration?

Justin Mason (jm-jmason) wrote :

the problem is that, for developers working with Python, they'll often have a custom Python build in $PATH before /usr/bin/python. it's quite a common custom configuration.

Also, personally, I'd attempt to make distro packages that are resilient to user $PATH changes. but I guess that's up to you guys.

Dimitrios Symeonidis (azimout) wrote :

are we going to do something about this or not? who can decide this?

Changed in rss2email (Ubuntu):
status: Incomplete → Confirmed
Michael Nagel (nailor) wrote :

also see Bug #984089 where they say:

"IIRC Packaged python programs must use /usr/bin/python per debian policy."

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers