From: Zhang Qiang Date: Tue, 31 Jul 2012 04:52:25 +0000 (+0800) Subject: use abspath for export dir X-Git-Tag: 0.9~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=383879bf0b4c06b62518f9a8c7849271a265b875;p=tools%2Fgbs.git use abspath for export dir if running gbs outside of git dir or in sub-dir of git tree, gbs can't export correctly. --- diff --git a/gitbuildsys/cmd_export.py b/gitbuildsys/cmd_export.py index da517b0..2f40435 100644 --- a/gitbuildsys/cmd_export.py +++ b/gitbuildsys/cmd_export.py @@ -100,16 +100,18 @@ def do(opts, args): if not os.path.isdir("%s/.git" % workdir): msger.error('Not a git repository (%s), aborting' % workdir) + # Only guess spec filename here, parse later when we have the correct + # spec file at hand + specfile = utils.guess_spec(workdir, opts.spec) + outdir = "%s/packaging" % workdir if opts.outdir: outdir = opts.outdir mkdir_p(outdir) - - # Only guess spec filename here, parse later when we have the correct - # spec file at hand - specfile = utils.guess_spec(workdir, opts.spec) + outdir = os.path.abspath(outdir) tempd = utils.Temp(prefix='gbs_export_', dirn=outdir, directory=True) export_dir = tempd.path + with utils.Workdir(workdir): if opts.commit: commit = opts.commit