[modules/packages] Added support for Portage and Entropy
This commit is contained in:
parent
55476ae6fc
commit
57406f3bc9
@ -40,7 +40,7 @@ macro( find_boost_python3 boost_version python_version found_var )
|
|||||||
break()
|
break()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
# The following loop chage the searched name for Gentoo based distributions
|
# The following loop changes the searched name for Gentoo based distributions
|
||||||
# turns "3.4.123abc" into "3.4"
|
# turns "3.4.123abc" into "3.4"
|
||||||
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1.\\2" _fbp_python_short_version ${python_version} )
|
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1.\\2" _fbp_python_short_version ${python_version} )
|
||||||
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} python-${_fbp_python_short_version} )
|
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} python-${_fbp_python_short_version} )
|
||||||
|
@ -55,6 +55,10 @@ class PackageManager:
|
|||||||
elif self.backend == "pacman":
|
elif self.backend == "pacman":
|
||||||
pacman_flags = "-U" if from_local else "-Sy"
|
pacman_flags = "-U" if from_local else "-Sy"
|
||||||
check_chroot_call(["pacman", pacman_flags, "--noconfirm"] + pkgs)
|
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):
|
def remove(self, pkgs):
|
||||||
""" Removes packages.
|
""" Removes packages.
|
||||||
@ -78,6 +82,10 @@ class PackageManager:
|
|||||||
check_chroot_call(["apt-get", "--purge", "-q", "-y", "autoremove"])
|
check_chroot_call(["apt-get", "--purge", "-q", "-y", "autoremove"])
|
||||||
elif self.backend == "pacman":
|
elif self.backend == "pacman":
|
||||||
check_chroot_call(["pacman", "-Rs", "--noconfirm"] + pkgs)
|
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):
|
def run_operations(pkgman, entry):
|
||||||
@ -102,7 +110,7 @@ def run():
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
backend = libcalamares.job.configuration.get("backend")
|
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))
|
return ("Bad backend", "backend=\"{}\"".format(backend))
|
||||||
|
|
||||||
pkgman = PackageManager(backend)
|
pkgman = PackageManager(backend)
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
# - urpmi - Mandriva package manager
|
# - urpmi - Mandriva package manager
|
||||||
# - apt - APT frontend for DEB and RPM
|
# - apt - APT frontend for DEB and RPM
|
||||||
# - pacman - Pacman
|
# - pacman - Pacman
|
||||||
|
# - portage - Gentoo package manager
|
||||||
|
# - entropy - Sabayon package manager
|
||||||
#
|
#
|
||||||
backend: packagekit
|
backend: packagekit
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user