From: Zhang Qiang Date: Wed, 6 Jun 2012 06:52:17 +0000 (+0800) Subject: use abspath in wordir to avoid no basename for git project X-Git-Tag: 0.7~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4420e731aae5bf3ba185192262494883ed8d03c;p=tools%2Fgbs.git use abspath in wordir to avoid no basename for git project --- diff --git a/gitbuildsys/cmd_build.py b/gitbuildsys/cmd_build.py index 0141b2d..963861d 100644 --- a/gitbuildsys/cmd_build.py +++ b/gitbuildsys/cmd_build.py @@ -224,7 +224,7 @@ def do(opts, args): if len(args) > 1: msger.error('only one work directory can be specified in args.') if len(args) == 1: - workdir = args[0] + workdir = os.path.abspath(args[0]) hostarch = get_hostarch() buildarch = hostarch diff --git a/gitbuildsys/cmd_export.py b/gitbuildsys/cmd_export.py index c08321b..025975f 100644 --- a/gitbuildsys/cmd_export.py +++ b/gitbuildsys/cmd_export.py @@ -52,13 +52,13 @@ def do(opts, args): """ workdir = os.getcwd() - if not os.path.exists("%s/packaging" % workdir): - msger.error('No packaging directory, so there is nothing to export.') - if len(args) > 1: msger.error('only one work directory can be specified in args.') if len(args) == 1: - workdir = args[0] + workdir = os.path.abspath(args[0]) + + if not os.path.exists("%s/packaging" % workdir): + msger.error('No packaging directory, so there is nothing to export.') if not os.path.isdir("%s/.git" % workdir): msger.error('Not a git repository (%s), aborting' % workdir) diff --git a/gitbuildsys/cmd_remotebuild.py b/gitbuildsys/cmd_remotebuild.py index fc5b0fb..25bebee 100644 --- a/gitbuildsys/cmd_remotebuild.py +++ b/gitbuildsys/cmd_remotebuild.py @@ -57,7 +57,7 @@ def do(opts, args): if len(args) > 1: msger.error('only one work directory can be specified in args.') if len(args) == 1: - workdir = args[0] + workdir = os.path.abspath(args[0]) try: repo = repository.GitRepository(workdir) except repository.GitRepositoryError: