]> arthur.barton.de Git - bup.git/commit
Add BUP_DIR to the subprocess environment during set-dir on the server.
authorGabriel Filion <lelutin@gmail.com>
Sat, 28 Jul 2012 03:02:10 +0000 (23:02 -0400)
committerRob Browning <rlb@defaultvalue.org>
Fri, 17 Aug 2012 18:42:59 +0000 (13:42 -0500)
commit8ed5d4da0b7f160bb903dfaa6ecc4f2f895f03f0
tree670af61424b4d856a411e89295859f9ab2571d52
parent8023ad2e8a0d451b162359a94da8530c56a8c82f
Add BUP_DIR to the subprocess environment during set-dir on the server.

In the normal flow of a remote backup, the client indicates to the
server end where it wants to save data (e.g. where the bup repository
is) by issuing a "set-dir path" command.

This command on the server end records the path in a global variable.
But it doesn't place it in the environment. This causes any subprocess
forked on the server end to be ignorant about the location of the
bup repository and causes errors such as this one:

Traceback (most recent call last):
  File "/usr/lib/bup/cmd/bup-midx", line 231, in <module>
    git.check_repo_or_die()
  File "/usr/lib/bup/bup/git.py", line 851, in check_repo_or_die
    init_repo()
  File "/usr/lib/bup/bup/git.py", line 828, in init_repo
    _git_wait('git init', p)
  File "/usr/lib/bup/bup/git.py", line 887, in _git_wait
    raise GitError('%s returned %d' % (cmd, rv))
bup.git.GitError: git init returned 1
['/usr/bin/bup', 'midx', '--auto', '--dir',
'/backup/test/objects/pack']: returned 1

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
cmd/server-cmd.py