Skip to content

Commit 0e3c910

Browse files
author
Alice Ferrazzi
committed
livepatch.py: adding enviroment variable for settings cpu jobs
1 parent 6a3c5d6 commit 0e3c910

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

resources/livepatch.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,15 @@ def build_kernel(self):
104104
# copy the olddefconfig generated config file back,
105105
# so that we don't trigger a config restart when kpatch-build runs
106106
shutil.copyfile(kernel_config_path, self.base_config_path)
107-
_command(['make'], self.__kernel_source_dir__)
107+
# Getting enviroment variable
108+
try:
109+
jobs = os.environ['JOBS']
110+
except:
111+
jobs = None
112+
if jobs:
113+
_command(['make', jobs], self.__kernel_source_dir__)
114+
else:
115+
_command(['make'], self.__kernel_source_dir__)
108116
_command(['make', 'modules'], self.__kernel_source_dir__)
109117

110118

0 commit comments

Comments
 (0)