From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxxxxxxxx> This lets us throw at it whatever extra stuff we want. Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxxxxx> --- gentree.py | 5 +++-- lib/bpgit.py | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gentree.py b/gentree.py index 86b3f3c..2810415 100755 --- a/gentree.py +++ b/gentree.py @@ -447,9 +447,10 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, backports_version = "(see git)" kernel_version = "(see git)" else: - backports_version = git.describe(tree=source_dir) + backports_version = git.describe(tree=source_dir, extra_args=['--long']) kernel_version = git.describe(rev=args.git_revision or 'HEAD', - tree=args.kerneldir) + tree=args.kerneldir, + extra_args=['--long']) f = open(os.path.join(args.outdir, 'versions'), 'w') f.write('BACKPORTS_VERSION="%s"\n' % backports_version) f.write('BACKPORTED_KERNEL_VERSION="%s"\n' % kernel_version) diff --git a/lib/bpgit.py b/lib/bpgit.py index 31b7de3..9a3f430 100644 --- a/lib/bpgit.py +++ b/lib/bpgit.py @@ -27,8 +27,14 @@ def rev_parse(rev='HEAD', tree=None): raise SHAError() return sha -def describe(rev='HEAD', tree=None): - process = subprocess.Popen(['git', 'describe', '--always', '--long', rev], +def describe(rev='HEAD', tree=None, extra_args=[]): + cmd = ['git', 'describe', '--always'] + + cmd.extend(extra_args) + if rev is not None: + cmd.append(rev) + + process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True, universal_newlines=True, cwd=tree) stdout = process.communicate()[0] -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe backports" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html