From 3fb56b4760b0485cf0872100f04b0a5a51f52e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 17 Aug 2015 18:35:12 +0200 Subject: Generated configuration is now fully stored to database Managing configurations in files and in database could cause inconsistence. Adding all generated configurations to database allow us to clean project files without loosing data. --- scripts/kernel.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/kernel.py') diff --git a/scripts/kernel.py b/scripts/kernel.py index 092de1e..c41fe1f 100644 --- a/scripts/kernel.py +++ b/scripts/kernel.py @@ -2,15 +2,18 @@ import os import sys import subprocess import shutil +import tempfile from conf import conf from conf import sf import exceptions import utils -def config(cfile): +def config(txtconfig): + "Apply text configuration to kernel folder" + infile = tempfile.NamedTemporaryFile() + infile.write(bytes(txtconfig, sys.getdefaultencoding())) wd = os.getcwd() - infile = os.path.join(sf(conf.configurations_folder), cfile) os.chdir(sf(conf.linux_sources)) try: utils.callsubprocess('write_config', [sf(conf.write_config), infile], -- cgit v1.2.3