gentree: fix describe version bug
authorJohannes Berg <johannes.berg@intel.com>
Thu, 4 Apr 2013 22:11:32 +0000 (00:11 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 4 Apr 2013 22:11:32 +0000 (00:11 +0200)
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>
gentree.py

index 5c59a059f825b4624aa750ce9209c71a860987db..ad1240cd6657a87afe343224108dc71f72c58dd9 100755 (executable)
@@ -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)