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
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,