use tmpdir to store tempary gbs cache data
authorZhang Qiang <qiang.z.zhang@intel.com>
Sun, 12 Aug 2012 11:15:33 +0000 (19:15 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Sun, 12 Aug 2012 11:15:33 +0000 (19:15 +0800)
gitbuildsys/cmd_build.py

index d69c81a..41e6298 100644 (file)
@@ -300,7 +300,8 @@ def do(opts, args):
         cmd += ['--no-init']
     else:
         # check & prepare repos and build conf if no noinit option
-        cachedir = os.path.join(tmpdir, userid, 'gbscache')
+        cache = utils.Temp(prefix=os.path.join(tmpdir, 'gbscache'), directory=True)
+        cachedir  = cache.path
         if not os.path.exists(cachedir):
             os.makedirs(cachedir)
         msger.info('generate repositories ...')