diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2013-04-04 18:25:02 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2013-04-04 18:25:20 +0200 |
commit | 7bb15f711b31cc33160b4de9d49caf245019b5c1 (patch) | |
tree | 57259f018b52e10fb99897abe0fffac832047832 /devel | |
parent | af3c2d1b5c38abc6976841139678ec3384b25189 (diff) |
git tracker: allow creating defconfig symlink
This makes it possible to do just 'make' in the output
tree, rather than having to configure first.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/git-tracker.ini.example | 3 | ||||
-rwxr-xr-x | devel/git-tracker.py | 13 |
2 files changed, 12 insertions, 4 deletions
diff --git a/devel/git-tracker.ini.example b/devel/git-tracker.ini.example index 96b895c9..f38f4dfa 100644 --- a/devel/git-tracker.ini.example +++ b/devel/git-tracker.ini.example @@ -27,7 +27,10 @@ cachedir = /tmp/work # # Optional parameters in each section are: # * branches comma separated list of branches, default "master" +# * defconfig if given, create a symlink defconfig -> defconfigs/<this> +# to allow just 'make' to work in the output directory # [iwlwifi] input = git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi.git output = /tmp/test.git +defconfig = iwlwifi diff --git a/devel/git-tracker.py b/devel/git-tracker.py index 4532b4b0..3d7ab26e 100755 --- a/devel/git-tracker.py +++ b/devel/git-tracker.py @@ -39,7 +39,7 @@ def update_cache_objects(gittree, objdir): git.remote_update(objdir) def handle_commit(args, msg, branch, treename, kernelobjdir, tmpdir, wgitdir, backport_rev, kernel_rev, - prev_kernel_rev=None): + prev_kernel_rev=None, defconfig=None): log = [] def logwrite(l): log.append(l) @@ -65,6 +65,8 @@ def handle_commit(args, msg, branch, treename, kernelobjdir, tmpdir, wgitdir, ba if not failure: git.rm(opts=['--ignore-unmatch', '-q', '--cached', '-r', '.'], tree=wdir) + if defconfig: + os.symlink('defconfigs/%s' % defconfig, os.path.join(wdir, 'defconfig')) git.add('.', tree=wdir) else: git.reset(opts=['-q'], tree=wdir) @@ -137,6 +139,9 @@ if __name__ == '__main__': for tree in trees: input = config.get(tree, 'input') output = config.get(tree, 'output') + defconfig = None + if config.has_option(tree, 'defconfig'): + defconfig = config.get(tree, 'defconfig') branches = [r.strip() for r in config.get(tree, 'branches').split(',')] update_cache_objects(input, kernelobjdir) @@ -173,7 +178,7 @@ if __name__ == '__main__': handle_commit(args, "Initialize backport branch\n\nCreate the new git tracker backport branch.", branch, tree, kernelobjdir, branch_tmpdir, wgitdir, backport_rev, - kernel_head) + kernel_head, defconfig=defconfig) continue if old_data['backport'] == backport_rev and old_data[tree] == kernel_head: continue @@ -182,7 +187,7 @@ if __name__ == '__main__': handle_commit(args, "Update backport tree\n\n", branch, tree, kernelobjdir, branch_tmpdir, wgitdir, backport_rev, - kernel_head) + kernel_head, defconfig=defconfig) continue # update from old to new if prefail in old_data: @@ -206,6 +211,6 @@ if __name__ == '__main__': pass failure = handle_commit(args, msg, branch, tree, kernelobjdir, branch_tmpdir, wgitdir, backport_rev, commit, - prev_kernel_rev=prev) + prev_kernel_rev=prev, defconfig=defconfig) if not failure: prev = commit |