From 0d2da0f8d09ea0c8c3bbd276ad91b8cb5403fe0e Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 30 Aug 2012 11:29:21 +0300 Subject: [PATCH] Used username as part of temporary directory. Temporary directory is used as a base path for buildroot, cachedir and others temporary directories. Making it to contain username solves conflicts when gbs is run by more than one user on the same machine at the same time. Fixes: #283, #278, #244 Change-Id: Iafb9f83691e945d7148ef70f059096dada2cc701 --- gitbuildsys/cmd_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitbuildsys/cmd_build.py b/gitbuildsys/cmd_build.py index 7fa6761..bebefb6 100644 --- a/gitbuildsys/cmd_build.py +++ b/gitbuildsys/cmd_build.py @@ -261,8 +261,8 @@ def do(opts, args): build_cmd = configmgr.get('build_cmd', 'build') userid = pwd.getpwuid(os.getuid())[0] - tmpdir = configmgr.get('tmpdir', 'general') - build_root = os.path.join(tmpdir, userid, 'gbs-buildroot.%s' % buildarch) + tmpdir = os.path.join(configmgr.get('tmpdir', 'general'), "%s-gbs" % userid) + build_root = os.path.join(tmpdir, 'gbs-buildroot.%s' % buildarch) if opts.buildroot: build_root = opts.buildroot cmd = [ build_cmd, -- 2.7.4