git tracker: override versions file
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 4 Apr 2013 16:01:51 +0000 (18:01 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Thu, 4 Apr 2013 16:21:19 +0000 (18:21 +0200)
Otherwise it keeps changing.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
devel/git-tracker.py
gentree.py

index 20b2aa57a0a8b378acfe043cbbd2f480841195f9..4532b4b0f76bd70be9757480b8a66d39256848aa 100755 (executable)
@@ -48,7 +48,9 @@ def handle_commit(args, msg, branch, treename, kernelobjdir, tmpdir, wgitdir, ba
     try:
         failure = gentree.process(kernelobjdir, wdir, open(args.copy_list, 'r'),
                                   git_revision=kernel_rev,
-                                  base_name=tree, logwrite=logwrite)
+                                  base_name=tree, logwrite=logwrite,
+                                  kernel_version_name="(see git)",
+                                  backport_version_name="(see git)")
 
         newline = '\n'
         if failure:
index 81516fe51bca779dc49bf87ec44ac55398a29f4f..5c59a059f825b4624aa750ce9209c71a860987db 100755 (executable)
@@ -235,7 +235,8 @@ def _main():
 
 def process(kerneldir, outdir, copy_list_file, git_revision=None,
             clean=False, refresh=False, base_name="Linux", gitdebug=False,
-            verbose=False, extra_driver=[], logwrite=lambda x:None):
+            verbose=False, extra_driver=[], logwrite=lambda x:None,
+            kernel_version_name=None, backport_version_name=None):
     class Args(object):
         def __init__(self, kerneldir, outdir, copy_list_file,
                      git_revision, clean, refresh, base_name,
@@ -377,8 +378,8 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
     git_debug_snapshot(args, "convert select to depends on")
 
     # write the versioning file
-    backports_version = git.describe(tree=source_dir)
-    kernel_version = git.describe(tree=args.kerneldir)
+    backports_version = backport_version_name or git.describe(tree=source_dir)
+    kernel_version = kernel_version_name or git.describe(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)