diff options
author | Luis R. Rodriguez <mcgrof@suse.com> | 2014-11-07 14:47:06 -0800 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2014-11-14 13:47:16 -0800 |
commit | fd6db4a2c4629fb9896f39f8f06b4a05ee9b0717 (patch) | |
tree | bd201029f9f61c6ce5754eb3ef9180704c117f7d /lib/kconfig.py | |
parent | b38a0d1bbb7d65546bb0100c3cf11db595e48496 (diff) |
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 <mcgrof@suse.com>
Diffstat (limited to 'lib/kconfig.py')
-rw-r--r-- | lib/kconfig.py | 6 |
1 files changed, 3 insertions, 3 deletions
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<src>[^\s"]*)"?\s*$') src_line_rel = re.compile(r'^\s*source\s+(?P<src>[^\s"]*)"?\s*$') tri_line = re.compile(r'^(?P<spc>\s+)tristate') bool_line = re.compile(r'^(?P<spc>\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<src>[^\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 |