[tahoe-lafs-trac-stream] [tahoe-lafs] #1441: '/usr/bin/tahoe debug --help' gives incorrect information about running coverage on the installed Debian/Ubuntu Tahoe

tahoe-lafs trac at tahoe-lafs.org
Thu Aug 11 17:38:54 PDT 2011


#1441: '/usr/bin/tahoe debug --help' gives incorrect information about running
coverage on the installed Debian/Ubuntu Tahoe
---------------------------+-----------------------------------------------
     Reporter:             |      Owner:  davidsarah
  davidsarah               |     Status:  closed
         Type:  defect     |  Milestone:  1.9.0
     Priority:  minor      |    Version:  1.8.2
    Component:  code-      |   Keywords:  debian ubuntu usability test news
  frontend-cli             |
   Resolution:  fixed      |
Launchpad Bug:             |
---------------------------+-----------------------------------------------

Comment (by davidsarah):

 Replying to [comment:6 kevan]:
 > The Python docs I can find on the subject say that whether
 {{{sys.argv[0]}}} is the full path to the script is OS-dependent.
 Presumably we've established that {{{sys.argv[0]}}} is always the full
 path on ubuntu and debian systems, but it'd be nice to see the reasoning
 behind that, either directly in the code or as a comment in this ticket
 for future reference.

 Apparently it depends on what the invoking program passes to the exec*
 call. Linux {{{bash}}}, {{{dash}}}, {{{ksh}}}, {{{zsh}}} and {{{tcsh}}}
 all pass the full path.

 {{{os.readlink('/proc/self/exe')}}} (when it succeeds) will give the full
 executable path on Linux, but unfortunately that will be the path to the
 Python interpreter in {{{tahoe}}}'s case. Since this is only affecting
 help text, and since I don't know of any more reliable way to perform this
 test, I think it is OK as it is in [5147/trunk].

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1441#comment:10>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list