packages: add debug logging to xbps

This commit is contained in:
Luca Matei Pintilie 2024-07-28 13:49:17 +02:00
parent 456bb1b3eb
commit 19430fac56
No known key found for this signature in database
GPG Key ID: F25C376E6E6BA508

View File

@ -583,17 +583,23 @@ class PMPortage(PackageManager):
class PMXbps(PackageManager):
backend = "xbps"
def line_cb(self, line):
libcalamares.utils.debug(line)
def run_xbps(self, command):
libcalamares.utils.target_env_process_output(command, self.line_cb);
def install(self, pkgs, from_local=False):
check_target_env_call(["xbps-install", "-Sy"] + pkgs)
self.run_xbps(["xbps-install", "-Sy"] + pkgs)
def remove(self, pkgs):
check_target_env_call(["xbps-remove", "-Ry", "--noconfirm"] + pkgs)
self.run_xbps(["xbps-remove", "-Ry"] + pkgs)
def update_db(self):
check_target_env_call(["xbps-install", "-S"])
self.run_xbps(["xbps-install", "-S"])
def update_system(self):
check_target_env_call(["xbps", "-Suy"])
self.run_xbps(["xbps", "-Suy"])
class PMYum(PackageManager):