summaryrefslogtreecommitdiff
path: root/gentree.py
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-04-05 00:11:32 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-04-05 00:11:32 +0200
commit4311d14688d39a907eb8de329a8d5c57fd9ef316 (patch)
tree130a29017a7505a5b3b269a813ce89d74be6d059 /gentree.py
parentc10bccddc01a52176f123ce4db0b26806aa3008e (diff)
gentree: fix describe version bug
With the --git-revision option, that revision needs to be used for the output version, not 'HEAD'. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'gentree.py')
-rwxr-xr-xgentree.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gentree.py b/gentree.py
index 5c59a059..ad1240cd 100755
--- a/gentree.py
+++ b/gentree.py
@@ -379,7 +379,8 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
# write the versioning file
backports_version = backport_version_name or git.describe(tree=source_dir)
- kernel_version = kernel_version_name or git.describe(tree=args.kerneldir)
+ kernel_version = kernel_version_name or git.describe(rev=args.git_revision or 'HEAD',
+ tree=args.kerneldir)
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)