[sugar] [PATCH] bin/datastore-service: respect $SUGAR_PROFILE, allowing multiple instances

Simon McVittie simon.mcvittie at collabora.co.uk
Thu May 17 08:37:34 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This patch is also in http://projects.collabora.co.uk/~smcv/git/datastore.git
if you want to merge it.

Regards,
- -- 
Simon McVittie, Collabora Ltd.: http://www.collabora.co.uk/

On Thu, 17 May 2007 at 13:23:45 +0100, Simon McVittie wrote:
> ---
>  bin/datastore-service |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/bin/datastore-service b/bin/datastore-service
> index e2a96d9..cad9fc4 100755
> --- a/bin/datastore-service
> +++ b/bin/datastore-service
> @@ -7,7 +7,8 @@ from olpc.datastore import DataStore, DS_LOG_CHANNEL
>  import logging
>  
>  # Path handling
> -base_dir = os.path.expanduser("~/.sugar/default")
> +profile = os.environ.get('SUGAR_PROFILE', 'default')
> +base_dir = os.path.join(os.path.expanduser('~'), '.sugar', profile)
>  repo_dir = os.path.join(base_dir, 'datastore')
>  db_dir   = "sqlite:///%s/datastore.db"  % repo_dir
>  
> -- 
> 1.5.2-rc3.GIT
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: OpenPGP key: http://www.pseudorandom.co.uk/2003/contact/ or pgp.net

iD8DBQFGTEyOWSc8zVUw7HYRAodIAJ9xrpFAfGqpRJleV5EjHL792l7+WACdFSp3
IsMJywnWsIzQi0xBS4fGCco=
=E/NW
-----END PGP SIGNATURE-----


More information about the Sugar mailing list