calamares/calamares-1.1.2-add_smart_package_manager_support.patch

42 lines
1.8 KiB
Diff
Raw Normal View History

diff -Nru calamares-1.1.2.orig/src/modules/packages/main.py calamares-1.1.2/src/modules/packages/main.py
--- calamares-1.1.2.orig/src/modules/packages/main.py 2015-08-10 16:20:20.000000000 +0200
+++ calamares-1.1.2/src/modules/packages/main.py 2015-08-13 09:08:59.320685283 +0200
@@ -62,6 +62,8 @@
check_chroot_call(["emerge", "-v"] + pkgs)
elif self.backend == "entropy":
check_chroot_call(["equo", "i"] + pkgs)
+ elif self.backend == "smart":
+ check_chroot_call(["smart", "install", "-y"] + pkgs)
def remove(self, pkgs):
""" Removes packages.
@@ -89,6 +91,8 @@
check_chroot_call(["emerge", "-C"] + pkgs)
elif self.backend == "entropy":
check_chroot_call(["equo", "rm"] + pkgs)
+ elif self.backend == "smart":
+ check_chroot_call(["smart", "remove", "-y"] + pkgs)
def run_operations(pkgman, entry):
@@ -114,7 +118,7 @@
"""
backend = libcalamares.job.configuration.get("backend")
- if backend not in ("packagekit", "zypp", "yum", "dnf", "urpmi", "apt", "pacman", "portage", "entropy"):
+ if backend not in ("packagekit", "zypp", "yum", "dnf", "urpmi", "apt", "pacman", "portage", "entropy", "smart"):
return "Bad backend", "backend=\"{}\"".format(backend)
pkgman = PackageManager(backend)
diff -Nru calamares-1.1.2.orig/src/modules/packages/packages.conf calamares-1.1.2/src/modules/packages/packages.conf
--- calamares-1.1.2.orig/src/modules/packages/packages.conf 2015-08-10 16:20:20.000000000 +0200
+++ calamares-1.1.2/src/modules/packages/packages.conf 2015-08-13 09:09:57.105431680 +0200
@@ -10,6 +10,7 @@
# - pacman - Pacman
# - portage - Gentoo package manager
# - entropy - Sabayon package manager
+# - smart - Smart package manage
#
backend: packagekit
#