calamares/calamares-2.3-add_smart_package_manager_support.patch

30 lines
1.5 KiB
Diff

--- calamares-2.3/src/modules/packages/main.py.orig 2016-07-14 14:46:30.000000000 +0200
+++ calamares-2.3/src/modules/packages/main.py 2016-07-14 14:51:57.738546931 +0200
@@ -39,6 +39,8 @@
if self.backend == "packagekit":
for pkg in pkgs:
check_target_env_call(["pkcon", "-py", "install", pkg])
+ elif self.backend == "smart":
+ check_target_env_call(["smart", "install", "-y"] + pkgs)
elif self.backend == "zypp":
check_target_env_call(["zypper", "--non-interactive", "--quiet-install", "install",
"--auto-agree-with-licenses", "install"] + pkgs)
@@ -71,6 +73,8 @@
if self.backend == "packagekit":
for pkg in pkgs:
check_target_env_call(["pkcon", "-py", "remove", pkg])
+ elif self.backend == "smart":
+ check_target_env_call(["smart", "remove", "-y"] + pkgs)
elif self.backend == "zypp":
check_target_env_call(["zypper", "--non-interactive", "remove"] + pkgs)
elif self.backend == "yum":
@@ -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)