From: Zhang Qiang Date: Tue, 14 Aug 2012 07:41:11 +0000 (+0800) Subject: copy build conf to $tmpdir/ for --noinit use X-Git-Tag: 0.9~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0edaf13452acf9d71fe73ec27b356d131777dd4;p=tools%2Fgbs.git copy build conf to $tmpdir/ for --noinit use --- diff --git a/gitbuildsys/cmd_build.py b/gitbuildsys/cmd_build.py index 7c5fa3f..cac8960 100644 --- a/gitbuildsys/cmd_build.py +++ b/gitbuildsys/cmd_build.py @@ -301,7 +301,8 @@ def do(opts, args): cmd += ['--no-init'] else: # check & prepare repos and build conf if no noinit option - cache = utils.Temp(prefix=os.path.join(tmpdir, 'gbscache'), directory=True) + cache = utils.Temp(prefix=os.path.join(tmpdir, 'gbscache'), + directory=True) cachedir = cache.path if not os.path.exists(cachedir): os.makedirs(cachedir) @@ -332,11 +333,13 @@ def do(opts, args): if opts.dist: distconf = opts.dist else: - distconf = repoparser.buildconf - if distconf is None: + if repoparser.buildconf is None: msger.info('failed to get build conf, use default build conf') distconf = configmgr.get('distconf', 'build') else: + shutil.copy(repoparser.buildconf, tmpdir) + distconf = os.path.join(tmpdir, os.path.basename(\ + repoparser.buildconf)) msger.info('build conf has been downloaded at:\n %s' \ % distconf)