Want a variable to override location of ~/.bazaar etc

Bug #348640 reported by amicitas
4
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

A way needs to be added to change the location of the bazaar configuration files. As of now the only control available is to set $BZR_HOME. Bazaar does not offer any control of where files go within this directory.

By default bazaar locates its file in:
POSIX:
  $HOME/.bazaar/
WINDOWS:
  %APPDATA%\bazaar\2.0\

That is a very reasonable place to put things. If I want to change that directory I can use $BZR_HOME:

POSIX:
  $BZR_HOME/.bazaar/
WINDOWS:
  %BZR_HOME%\bazaar\2.0\

I would like a way to change where under $BSR_HOME the configuration files are being saved. This is particularly true for me on windows where "\bazaar\2.0\" does not make sense outside of the "%APPDATA%" directory.

There are two ways that I can see to simply add this ability:
  1. Make $BZR_HOME into the actual configuration directory.
      That would mean for all systems if $BZR_HOME is found the conf
      files would be stored under:
      $BZR_HOME/

      The problem with doing this is that it breaks existing installations.
      (though this could be mitigated somewhat by checking for the
      existence of the old structure on install.)

  2. Add a new environmental variable.
      Something like $BZR_CONF_PATH. This environmental variable
      would override $BZR_HOME.

Tags: config
amicitas (mir-amicitas)
description: updated
Revision history for this message
Martin Pool (mbp) wrote :

That sounds reasonable. I'd probably go for #2. Want to try a patch? It's probably not very hard.

summary: - More control for the location of configuration files.
+ Want a variable to override location of ~/.bazaar etc
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
amicitas (mir-amicitas) wrote :

I would be willing to do a patch. It might be a while before I have time though.
Before I start working on it, I'll check back to make sure no one else has started, then make another comment in here.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 348640] Re: Want a variable to override location of ~/.bazaar etc

2009/7/3 amicitas <email address hidden>:
> I would be willing to do a patch.  It might be a while before I have time though.
> Before I start working on it, I'll check back to make sure no one else has started, then make another comment in here.

OK. If you get stuck, just ask.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

This is fixed?

$ bzr help env-variables
BZR_HOME Directory holding .bazaar config dir. Overrides HOME.
BZR_HOME (Win32) Directory holding bazaar config dir. Overrides APPDATA and HOME.

Revision history for this message
Max Bowsher (maxb) wrote :

Dmitrijs Ledkovs wrote:
> This is fixed?

No - read the bug description more closely.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 348640] Re: Want a variable to override location of ~/.bazaar etc

I think there's an XDG convention for how the environment variable
should be named; we should use that.

Revision history for this message
Max Bowsher (maxb) wrote :

> I think there's an XDG convention for how the environment variable
> should be named; we should use that.

I'm pretty sure the original requester is asking for a way to override the *entire* directory name - i.e. $NOTIONAL_NEW_ENV_VAR/{bazaar.conf,plugins/,locations.conf,...}

As far as I know, XDG only operates at the level of defining conventions for trees, within which apps reserve particular paths - not envvar conventions for envvars private to specific apps?

Revision history for this message
Martin Pool (mbp) wrote :

On 5 April 2011 10:37, Max Bowsher <email address hidden> wrote:
>> I think there's an XDG convention for how the environment variable
>> should be named; we should use that.
>
> I'm pretty sure the original requester is asking for a way to override
> the *entire* directory name - i.e.
> $NOTIONAL_NEW_ENV_VAR/{bazaar.conf,plugins/,locations.conf,...}

Right.

> As far as I know, XDG only operates at the level of defining conventions
> for trees, within which apps reserve particular paths - not envvar
> conventions for envvars private to specific apps?

OK. I didn't check. Something like BZR_CONFIG_DIR could be good.

Revision history for this message
John A Meinel (jameinel) wrote :

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

On 4/5/2011 2:49 AM, Martin Pool wrote:
> On 5 April 2011 10:37, Max Bowsher <email address hidden> wrote:
>>> I think there's an XDG convention for how the environment variable
>>> should be named; we should use that.
>>
>> I'm pretty sure the original requester is asking for a way to override
>> the *entire* directory name - i.e.
>> $NOTIONAL_NEW_ENV_VAR/{bazaar.conf,plugins/,locations.conf,...}
>
> Right.
>
>> As far as I know, XDG only operates at the level of defining conventions
>> for trees, within which apps reserve particular paths - not envvar
>> conventions for envvars private to specific apps?
>
> OK. I didn't check. Something like BZR_CONFIG_DIR could be good.
>

I thought that is what BZR_HOME does. Is it not handling plugins correctly?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2a3BgACgkQJdeBCYSNAAP9WgCfeXSCgqllFTP3G8oW+pvTXwWq
x88AmwaTmhhloCwVsHcEPLPlbbU7E/nH
=RbBv
-----END PGP SIGNATURE-----

Revision history for this message
Max Bowsher (maxb) wrote : Re: [Bug 348640] Re: Want a variable to override location of ~/.bazaar etc

On 05/04/11 10:08, John A Meinel wrote:
> I thought that is what BZR_HOME does. Is it not handling plugins
> correctly?

The bug reporter requests the ability to override the whole path to the
Bazaar configuration directory, without a hardcoded ".bazaar" or
"bazaar\2.0" (platform-dependent) appended to the end of the environment
variable's location.

Vincent Ladeuil (vila)
tags: added: config
removed: configuration
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.