Merge pull request #2357 from AnInternetTroll/user/luca/xbps-log

packages: add debug logging to xbps
This commit is contained in:
Adriaan de Groot 2024-08-12 23:14:30 +02:00 committed by GitHub
commit 237e3f7066
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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):