From fd6db4a2c4629fb9896f39f8f06b4a05ee9b0717 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Fri, 7 Nov 2014 14:47:06 -0800 Subject: backports: make kconfig src_line backport / ConfigTree specific The kconfig source line used on a backport project is very project specific. For backport packaging the source line simply should follow the full path of the project but for integration this will vary depending on the backport prefix directory used. We'll add support for that next. $ time /home/mcgrof/backports/devel/ckmake --allyesconfig 1 3.0.101 [ OK ] 2 3.1.10 [ OK ] 3 3.2.62 [ OK ] 4 3.3.8 [ OK ] 5 3.4.104 [ OK ] 6 3.5.7 [ OK ] 7 3.6.11 [ OK ] 8 3.7.10 [ OK ] 9 3.8.13 [ OK ] 10 3.9.11 [ OK ] 11 3.10.58 [ OK ] 12 3.11.10 [ OK ] 13 3.12.31 [ OK ] 14 3.13.11 [ OK ] 15 3.14.22 [ OK ] 16 3.15.10 [ OK ] 17 3.16.6 [ OK ] 18 3.17.1 [ OK ] 19 3.18-rc1 [ OK ] real 43m56.439s user 1187m4.516s sys 138m53.328s Signed-off-by: Luis R. Rodriguez --- lib/kconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/kconfig.py b/lib/kconfig.py index f348d4a6..ac96613e 100644 --- a/lib/kconfig.py +++ b/lib/kconfig.py @@ -4,7 +4,6 @@ import os, re -src_line = re.compile(r'^\s*source\s+"(?P[^\s"]*)"?\s*$') src_line_rel = re.compile(r'^\s*source\s+(?P[^\s"]*)"?\s*$') tri_line = re.compile(r'^(?P\s+)tristate') bool_line = re.compile(r'^(?P\s+)bool') @@ -16,6 +15,7 @@ class ConfigTree(object): def __init__(self, rootfile, bpid): self.bpid = bpid self.rootfile = os.path.basename(rootfile) + self.src_line = re.compile(r'^\s*source\s+"(?P[^\s"]*)"?\s*$') def _check_relative_source(self, f, l): # @@ -31,7 +31,7 @@ class ConfigTree(object): def _walk(self, f): yield f for l in open(os.path.join(self.bpid.target_dir, f), 'r'): - m = src_line.match(l) + m = self.src_line.match(l) if m and os.path.exists(os.path.join(self.bpid.target_dir, m.group('src'))): for i in self._walk(m.group('src')): yield i @@ -42,7 +42,7 @@ class ConfigTree(object): for nf in self._walk(f): out = '' for l in open(os.path.join(self.bpid.target_dir, nf), 'r'): - m = src_line.match(l) + m = self.src_line.match(l) if not m: self._check_relative_source(nf, l) out += l -- cgit v1.2.3