From a5b46f72ce599f8b03fb82e68fb197606855abae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 24 Jul 2015 18:17:47 +0200 Subject: [PATCH] kernel.make is now copying linux image to jobfile folder And make now returns name of image. --- scripts/kernel.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/kernel.py b/scripts/kernel.py index bfa1c50..092de1e 100644 --- a/scripts/kernel.py +++ b/scripts/kernel.py @@ -1,6 +1,7 @@ import os import sys import subprocess +import shutil from conf import conf from conf import sf @@ -31,7 +32,7 @@ def config(cfile): # stdout=subprocess.DEVNULL, env=utils.get_kernel_env()) # os.chdir(wd) -def make(): +def make(confhash): wd = os.getcwd() os.chdir(sf(conf.linux_sources)) if conf.kernel_make_output: @@ -39,10 +40,7 @@ def make(): else: subprocess.call(conf.build_command, stdout=subprocess.DEVNULL, env=utils.get_kernel_env()) - - try: - os.symlink(sf(conf.linux_image), sf(conf.jobfolder_linux_image)) - except FileExistsError: - pass - + jobimage = os.path.join(sf(conf.build_folder), confhash + '_linux.img') + shutil.move(sf(conf.linux_image), jobimage) os.chdir(wd) + return confhash + '_linux.img' -- 2.39.2