Skip to content

Commit

Permalink
drivers: refactor pre-req install for debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Peterson444 committed Jul 18, 2024
1 parent 6af4933 commit 3cfb8a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions subiquity/server/ubuntu_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def __init__(self, app, gpgpu: bool) -> None:

self.sys_env = system_scripts_env()

self.pre_req_cmd = ["apt", "install", "-y", "umockdev", "gir1.2-umockdev-1.0"]

self.list_drivers_cmd = prefix + self.list_drivers_cmd
self.list_oem_cmd = prefix + self.list_oem_cmd
self.install_drivers_cmd = prefix + self.install_drivers_cmd
Expand All @@ -224,9 +226,7 @@ async def ensure_cmd_exists(self, root_dir: str) -> None:
)
# Install wrapper script prerequisites on live system
try:
await arun_command(
["apt", "install", "-y", "umockdev", "gir1.2-umockdev-1.0"], check=True
)
await arun_command(self.pre_req_cmd, check=True)
except subprocess.CalledProcessError as err:
log.debug(f"ensure_cmd retuned with exit code {err.returncode}")
log.debug(f"ensure_cmd stdout: {err.stdout}")
Expand Down Expand Up @@ -287,7 +287,7 @@ async def install_drivers(self, root_dir: str, context) -> None:
"-t",
root_dir,
"--",
*["apt", "install", "-y", "umockdev", "gir1.2-umockdev-1.0"],
*self.pre_req_cmd,
private_mounts=True,
)

Expand Down

0 comments on commit 3cfb8a5

Please sign in to comment.