From f034b55da23e4cdc4fc026a0ec3c93f2a2ba6955 Mon Sep 17 00:00:00 2001 From: Pablo Ovelleiro Corral Date: Thu, 11 Jun 2020 11:45:50 +0200 Subject: [PATCH] [packages] add xbps package manager --- src/modules/packages/main.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/modules/packages/main.py b/src/modules/packages/main.py index 8f58cd6fb..3e29d72e1 100644 --- a/src/modules/packages/main.py +++ b/src/modules/packages/main.py @@ -274,6 +274,20 @@ class PMApt(PackageManager): # Doesn't need to update the system explicitly pass +class PMXbps(PackageManager): + backend = "xbps" + + def install(self, pkgs, from_local=False): + check_target_env_call(["xbps-install", "-Sy"] + pkgs) + + def remove(self, pkgs): + check_target_env_call(["xbps-remove", "-Ry", "--noconfirm"] + pkgs) + + def update_db(self): + check_target_env_call(["xbps-install", "-S"]) + + def update_system(self): + check_target_env_call(["xbps", "-Suy"]) class PMPacman(PackageManager): backend = "pacman"