Index: client/bin/kernel.py |
diff --git a/client/bin/kernel.py b/client/bin/kernel.py |
index f3f5a38c540c3f6741e0d4489f7143c56c451947..cb0ef9992dee83f93eaa01c19e3cd398cf9a0b3c 100644 |
--- a/client/bin/kernel.py |
+++ b/client/bin/kernel.py |
@@ -332,15 +332,17 @@ class kernel(BootableKernel): |
utils.extract_tarball_to_dir(tarball, self.build_dir) |
- def extraversion(self, tag, append=1): |
+ def extraversion(self, tag, append=True): |
os.chdir(self.build_dir) |
- extraversion_sub = r's/^EXTRAVERSION =\s*\(.*\)/EXTRAVERSION = ' |
+ extraversion_sub = r's/^CONFIG_LOCALVERSION=\s*"\(.*\)"/CONFIG_LOCALVERSION=' |
+ cfg = self.build_dir + '/.config' |
if append: |
- p = extraversion_sub + '\\1-%s/' % tag |
+ p = extraversion_sub + '"\\1-%s"/' % tag |
else: |
- p = extraversion_sub + '-%s/' % tag |
- utils.system('mv Makefile Makefile.old') |
- utils.system('sed "%s" < Makefile.old > Makefile' % p) |
+ p = extraversion_sub + '"-%s"/' % tag |
+ utils.system('mv %s %s.old' % (cfg, cfg)) |
+ utils.system("sed '%s' < %s.old > %s" % (p, cfg, cfg)) |
+ self.config(make='oldconfig') |
@log.record |