Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3245)

Unified Diff: client/bin/kernel.py

Issue 6246035: Merge remote branch 'cros/upstream' into master (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« cli/job.py ('K') | « client/bin/job_unittest.py ('k') | client/bin/kernel_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698