Return-path: Received: from mail-pd0-f181.google.com ([209.85.192.181]:61738 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755176Ab3G3J0W (ORCPT ); Tue, 30 Jul 2013 05:26:22 -0400 Received: by mail-pd0-f181.google.com with SMTP id g10so2769855pdj.40 for ; Tue, 30 Jul 2013 02:26:22 -0700 (PDT) From: "Luis R. Rodriguez" To: backports@vger.kernel.org Cc: Johannes Berg , "Luis R. Rodriguez" Subject: [PATCH 04/14] backport: disable unused automatic backports Date: Tue, 30 Jul 2013 02:25:49 -0700 Message-Id: <1375176359-1331-5-git-send-email-mcgrof@do-not-panic.com> (sfid-20130730_112624_104022_5A079253) In-Reply-To: <1375176359-1331-1-git-send-email-mcgrof@do-not-panic.com> References: <1375176359-1331-1-git-send-email-mcgrof@do-not-panic.com> Sender: backports-owner@vger.kernel.org List-ID: From: Johannes Berg When an automatic backport isn't included due to not being used (see commit 6e0475b599217eceb8e01a1e572c, "gentree: add automatic backports only if needed"), selecting BACKPORT_USERSEL_BUILD_ALL will make the build fail. Avoid this by disabling such symbols in the Kconfig. Signed-off-by: Johannes Berg Signed-off-by: Luis R. Rodriguez --- gentree.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gentree.py b/gentree.py index 356871d..b6c98e8 100755 --- a/gentree.py +++ b/gentree.py @@ -176,6 +176,7 @@ def automatic_backport_mangle_c_file(name): def add_automatic_backports(args): + disable_list = [] export = re.compile(r'^EXPORT_SYMBOL(_GPL)?\((?P[^\)]*)\)') bpi = kconfig.get_backport_info(os.path.join(args.outdir, 'compat', 'Kconfig')) configtree = kconfig.ConfigTree(os.path.join(args.outdir, 'Kconfig')) @@ -183,6 +184,7 @@ def add_automatic_backports(args): for sym, vals in bpi.items(): if sym.startswith('BACKPORT_BUILD_'): if not sym[15:] in all_selects: + disable_list.append(sym) continue symtype, module_name, c_files, h_files = vals @@ -229,6 +231,7 @@ def add_automatic_backports(args): outf.write('#define %s LINUX_BACKPORT(%s)\n' % (s, s)) outf.write('#include <%s>\n' % (os.path.dirname(f) + '/backport-' + os.path.basename(f), )) outf.write('#endif /* CPTCFG_%s */\n' % sym) + return disable_list def git_debug_init(args): """ @@ -346,7 +349,10 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, git_debug_snapshot(args, 'Add driver sources') - add_automatic_backports(args) + disable_list = add_automatic_backports(args) + if disable_list: + bpcfg = kconfig.ConfigTree(os.path.join(args.outdir, 'compat', 'Kconfig')) + bpcfg.disable_symbols(disable_list) git_debug_snapshot(args, 'Add automatic backports') logwrite('Apply patches ...') -- 1.7.10.4