mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
[packages] Add apk (Alpine Linux package manager) support
This commit is contained in:
parent
8f060a741f
commit
136d22188e
2 changed files with 19 additions and 0 deletions
|
@ -364,6 +364,24 @@ class PMPisi(PackageManager):
|
|||
pass
|
||||
|
||||
|
||||
class PMApk(PackageManager):
|
||||
backend = "apk"
|
||||
|
||||
def install(self, pkgs, from_local=False):
|
||||
for pkg in pkgs:
|
||||
check_target_env_call(["apk", "add", pkg])
|
||||
|
||||
def remove(self, pkgs):
|
||||
for pkg in pkgs:
|
||||
check_target_env_call(["apk", "del", pkg])
|
||||
|
||||
def update_db(self):
|
||||
check_target_env_call(["apk", "update"])
|
||||
|
||||
def update_system(self):
|
||||
check_target_env_call(["apk", "upgrade", "--available"])
|
||||
|
||||
|
||||
# Collect all the subclasses of PackageManager defined above,
|
||||
# and index them based on the backend property of each class.
|
||||
backend_managers = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue