From: Johannes Berg Date: Thu, 4 Apr 2013 16:01:51 +0000 (+0200) Subject: git tracker: override versions file X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=49049388739582ee21641aadac7623c63669aaf3;p=openwrt%2Fstaging%2Fblogic.git git tracker: override versions file Otherwise it keeps changing. Signed-off-by: Johannes Berg --- diff --git a/devel/git-tracker.py b/devel/git-tracker.py index 20b2aa57a0a8..4532b4b0f76b 100755 --- a/devel/git-tracker.py +++ b/devel/git-tracker.py @@ -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: diff --git a/gentree.py b/gentree.py index 81516fe51bca..5c59a059f825 100755 --- a/gentree.py +++ b/gentree.py @@ -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)