Merge pull request #1331 from PureTryOut/apk-support
[packages] Add apk (Alpine Linux package manager) support
This commit is contained in:
commit
f5522425f6
@ -364,6 +364,24 @@ class PMPisi(PackageManager):
|
|||||||
pass
|
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,
|
# Collect all the subclasses of PackageManager defined above,
|
||||||
# and index them based on the backend property of each class.
|
# and index them based on the backend property of each class.
|
||||||
backend_managers = [
|
backend_managers = [
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
# - pacman - Pacman
|
# - pacman - Pacman
|
||||||
# - portage - Gentoo package manager
|
# - portage - Gentoo package manager
|
||||||
# - entropy - Sabayon package manager
|
# - entropy - Sabayon package manager
|
||||||
|
# - apk = Alpine Linux package manager
|
||||||
# - dummy - Dummy manager, only logs
|
# - dummy - Dummy manager, only logs
|
||||||
#
|
#
|
||||||
backend: dummy
|
backend: dummy
|
||||||
|
Loading…
Reference in New Issue
Block a user