← Back to team overview

launchpad-dev team mailing list archive

Re: Finding the right 'bzr' at runtime for 'lp-forking-service'

 

On Wed, Nov 24, 2010 at 4:23 PM, John Arbash Meinel
<john@xxxxxxxxxxxxxxxxx> wrote:
> On 11/24/2010 6:38 AM, Jonathan Lange wrote:
>> On Tue, Nov 23, 2010 at 10:41 PM, John Arbash Meinel
>> <john@xxxxxxxxxxxxxxxxx> wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> As part of the forking service work, I'm trying to put together the init
>>> script. The current blocker is finding the 'bzr' script itself to run.
>>>
>>> As near as I can tell, the path to use is:
>>>  $launchpad/eggs/bzr-2.2.1-py2.6-linux-i686.egg/EGG-INFO/scripts/bzr
>>>
>>
>> Look in lp.codehosting.sshserver.launch_smart_server to see what we do already:
>>
>> {{{
>> from lp.codehosting import get_bzr_path
>> ...
>>     python_command = "%(root)s/bin/py %(bzr)s" % {
>>             'root': config.root,
>>             'bzr': get_bzr_path(),
>>             }
>> }}}
>>
>> It's probably not the right way, but it does work.
>>
>> jml
>>
>
> Which is exactly what I posted originally (find the dir of
> bzrlib.__file__ and track backwards).
>
> I was told on IRC that creating a 'bin/bzr' is more tasteful, so I guess
> now I'll be tracking that down.
>

You're welcome to do so, however, I think it would be better to land
something that uses the existing, less tasteful way and then fix it to
be a proper buildout thing in a later branch.

jml



Follow ups

References