mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-30 02:45:37 -04:00
[modules/packages] Added support for Portage and Entropy
This commit is contained in:
parent
55476ae6fc
commit
57406f3bc9
3 changed files with 16 additions and 6 deletions
|
@ -55,6 +55,10 @@ class PackageManager:
|
|||
elif self.backend == "pacman":
|
||||
pacman_flags = "-U" if from_local else "-Sy"
|
||||
check_chroot_call(["pacman", pacman_flags, "--noconfirm"] + pkgs)
|
||||
elif self.backend == "portage":
|
||||
check_chroot_call(["emerge", "-v"] + pkgs)
|
||||
elif self.backend == "entropy":
|
||||
check_chroot_call(["equo", "i"] + pkgs)
|
||||
|
||||
def remove(self, pkgs):
|
||||
""" Removes packages.
|
||||
|
@ -78,6 +82,10 @@ class PackageManager:
|
|||
check_chroot_call(["apt-get", "--purge", "-q", "-y", "autoremove"])
|
||||
elif self.backend == "pacman":
|
||||
check_chroot_call(["pacman", "-Rs", "--noconfirm"] + pkgs)
|
||||
elif self.backend == "portage":
|
||||
check_chroot_call(["emerge", "-C"] + pkgs)
|
||||
elif self.backend == "entropy":
|
||||
check_chroot_call(["equo", "rm"] + pkgs)
|
||||
|
||||
|
||||
def run_operations(pkgman, entry):
|
||||
|
@ -102,7 +110,7 @@ def run():
|
|||
:return:
|
||||
"""
|
||||
backend = libcalamares.job.configuration.get("backend")
|
||||
if backend not in ("packagekit", "zypp", "yum", "dnf", "urpmi", "apt", "pacman"):
|
||||
if backend not in ("packagekit", "zypp", "yum", "dnf", "urpmi", "apt", "pacman", "portage", "entropy"):
|
||||
return ("Bad backend", "backend=\"{}\"".format(backend))
|
||||
|
||||
pkgman = PackageManager(backend)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue