Skip to content

Commit

Permalink
split kernel and packages
Browse files Browse the repository at this point in the history
  • Loading branch information
thir820 committed Oct 8, 2024
1 parent 4a8cb59 commit e6a928e
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions ebcl/tools/initrd/initrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ def __init__(self, config_file: str, output_path: str):
self.config.busybox = parse_package(
'busybox-static', self.config.arch)

if self.config.kernel:
self.config.packages.append(self.config.kernel)

self.proxy = self.config.proxy

def install_busybox(self) -> bool:
Expand Down Expand Up @@ -213,12 +210,8 @@ def add_devices(self):

def download_deb_packages(self):
""" Download all needed deb packages. """
packages = self.config.packages.copy()
if self.config.kernel:
packages.remove(self.config.kernel)

(_debs, _contents, missing) = self.proxy.download_deb_packages(
packages=packages,
packages=self.config.packages,
contents=self.target_dir,
download_depends=True
)
Expand Down Expand Up @@ -257,11 +250,11 @@ def create_initrd(self) -> Optional[str]:
if self.config.modules_folder:
mods_dir = self.config.modules_folder
logging.info('Using modules from folder %s...', mods_dir)
elif self.config.packages:
elif self.config.kernel:
mods_dir = tempfile.mkdtemp()
logging.info('Using modules from deb packages...')
logging.info('Using modules from kernel deb packages...')
(_debs, _contents, missing) = self.config.proxy.download_deb_packages(
packages=self.config.packages,
packages=self.config.kernel,
contents=mods_dir
)
if missing:
Expand Down

0 comments on commit e6a928e

Please sign in to comment.