Choosing a correct working-dir for upgrade-server

Noah Kantrowitz kantrn at rpi.edu
Fri Jan 18 19:06:56 EST 2008


On Jan 18, 2008, at 6:49 PM, Michael Stone wrote:

> When inetd runs upgrade-server/upserv.py, it does so with in the  
> working dir /.
>
> Since the upgrade-server's python modules are not installed in  
> PYTHONPATH, this
> choice of working-dir interferes with the module loading that occurs  
> when
> re-running python inside fakeroot.
>
> Hardcoding the correct choice of working-dir fixes the observed  
> failure of the
> upgrade-server's 'on-demand build download' feature; however, it's  
> probably
> worth fixing this for real by either:
>
> a) packaging upgrade-server so that it properly installs its modules  
> in
>    PYTHONPATH or
>
> b) calculating an appropriate working dir at run time based on a  
> command-line
>    argument, environment variable, or based on the location of the  
> python
>    script being executed.

c) Use 2.5 new relative import stuffs.

--Noah



More information about the Devel mailing list