Merge pull request #1441 from codesardine/calamares
[packages] add pamac support
This commit is contained in:
commit
a923db0289
@ -178,6 +178,7 @@ class PMPackageKit(PackageManager):
|
|||||||
def update_system(self):
|
def update_system(self):
|
||||||
check_target_env_call(["pkcon", "-py", "update"])
|
check_target_env_call(["pkcon", "-py", "update"])
|
||||||
|
|
||||||
|
|
||||||
class PMZypp(PackageManager):
|
class PMZypp(PackageManager):
|
||||||
backend = "zypp"
|
backend = "zypp"
|
||||||
|
|
||||||
@ -198,6 +199,7 @@ class PMZypp(PackageManager):
|
|||||||
# Doesn't need to update the system explicitly
|
# Doesn't need to update the system explicitly
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class PMYum(PackageManager):
|
class PMYum(PackageManager):
|
||||||
backend = "yum"
|
backend = "yum"
|
||||||
|
|
||||||
@ -215,6 +217,7 @@ class PMYum(PackageManager):
|
|||||||
def update_system(self):
|
def update_system(self):
|
||||||
check_target_env_call(["yum", "-y", "upgrade"])
|
check_target_env_call(["yum", "-y", "upgrade"])
|
||||||
|
|
||||||
|
|
||||||
class PMDnf(PackageManager):
|
class PMDnf(PackageManager):
|
||||||
backend = "dnf"
|
backend = "dnf"
|
||||||
|
|
||||||
@ -274,6 +277,7 @@ class PMApt(PackageManager):
|
|||||||
# Doesn't need to update the system explicitly
|
# Doesn't need to update the system explicitly
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class PMXbps(PackageManager):
|
class PMXbps(PackageManager):
|
||||||
backend = "xbps"
|
backend = "xbps"
|
||||||
|
|
||||||
@ -289,6 +293,7 @@ class PMXbps(PackageManager):
|
|||||||
def update_system(self):
|
def update_system(self):
|
||||||
check_target_env_call(["xbps", "-Suy"])
|
check_target_env_call(["xbps", "-Suy"])
|
||||||
|
|
||||||
|
|
||||||
class PMPacman(PackageManager):
|
class PMPacman(PackageManager):
|
||||||
backend = "pacman"
|
backend = "pacman"
|
||||||
|
|
||||||
@ -311,6 +316,31 @@ class PMPacman(PackageManager):
|
|||||||
check_target_env_call(["pacman", "-Su", "--noconfirm"])
|
check_target_env_call(["pacman", "-Su", "--noconfirm"])
|
||||||
|
|
||||||
|
|
||||||
|
class PMPamac(PackageManager):
|
||||||
|
backend = "pamac"
|
||||||
|
|
||||||
|
def del_db_lock(self, lock="/var/lib/pacman/db.lck"):
|
||||||
|
# In case some error or crash, the database will be locked,
|
||||||
|
# resulting in remaining packages not being installed.
|
||||||
|
check_target_env_call(["rm", "-f", lock])
|
||||||
|
|
||||||
|
def install(self, pkgs, from_local=False):
|
||||||
|
self.del_db_lock()
|
||||||
|
check_target_env_call([self.backend, "install", "--no-confirm"] + pkgs)
|
||||||
|
|
||||||
|
def remove(self, pkgs):
|
||||||
|
self.del_db_lock()
|
||||||
|
check_target_env_call([self.backend, "remove", "--no-confirm"] + pkgs)
|
||||||
|
|
||||||
|
def update_db(self):
|
||||||
|
self.del_db_lock()
|
||||||
|
check_target_env_call([self.backend, "update", "--no-confirm"])
|
||||||
|
|
||||||
|
def update_system(self):
|
||||||
|
self.del_db_lock()
|
||||||
|
check_target_env_call([self.backend, "upgrade", "--no-confirm"])
|
||||||
|
|
||||||
|
|
||||||
class PMPortage(PackageManager):
|
class PMPortage(PackageManager):
|
||||||
backend = "portage"
|
backend = "portage"
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# - urpmi - Mandriva package manager
|
# - urpmi - Mandriva package manager
|
||||||
# - yum - Yum RPM frontend
|
# - yum - Yum RPM frontend
|
||||||
# - zypp - Zypp RPM frontend
|
# - zypp - Zypp RPM frontend
|
||||||
|
# - pamac - Manjaro package manager
|
||||||
#
|
#
|
||||||
# Not actually a package manager, but suitable for testing:
|
# Not actually a package manager, but suitable for testing:
|
||||||
# - dummy - Dummy manager, only logs
|
# - dummy - Dummy manager, only logs
|
||||||
|
@ -17,6 +17,7 @@ properties:
|
|||||||
- urpmi
|
- urpmi
|
||||||
- yum
|
- yum
|
||||||
- zypp
|
- zypp
|
||||||
|
- pamac
|
||||||
- dummy
|
- dummy
|
||||||
|
|
||||||
update_db: { type: boolean, default: true }
|
update_db: { type: boolean, default: true }
|
||||||
|
Loading…
Reference in New Issue
Block a user