Merge branch 'development' of github.com:manjaro/calamares into development
This commit is contained in:
commit
e7dd377e27
@ -149,7 +149,7 @@ class PacmanController:
|
|||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def install(self, local=False):
|
def install(self, pkglist, local=False):
|
||||||
cachedir = join(self.root, "var/cache/pacman/pkg")
|
cachedir = join(self.root, "var/cache/pacman/pkg")
|
||||||
dbdir = join(self.root, "var/lib/pacman")
|
dbdir = join(self.root, "var/lib/pacman")
|
||||||
args = ["pacman", "--noconfirm"]
|
args = ["pacman", "--noconfirm"]
|
||||||
@ -159,23 +159,38 @@ class PacmanController:
|
|||||||
args.extend(["-Sy"])
|
args.extend(["-Sy"])
|
||||||
|
|
||||||
args.extend(["--cachedir", cachedir, "--root", self.root, "--dbpath", dbdir])
|
args.extend(["--cachedir", cachedir, "--root", self.root, "--dbpath", dbdir])
|
||||||
cmd = args + self.operations["install"]
|
cmd = args + pkglist
|
||||||
self.parse_output(cmd)
|
self.parse_output(cmd)
|
||||||
|
|
||||||
def remove(self):
|
def remove(self, pkglist):
|
||||||
args = ["chroot", self.root, "pacman", "-Rs", "--noconfirm"]
|
args = ["chroot", self.root, "pacman", "-Rs", "--noconfirm"]
|
||||||
cmd = args + self.operations["remove"]
|
cmd = args + pkglist
|
||||||
check_target_env_call(cmd)
|
check_target_env_call(cmd)
|
||||||
|
|
||||||
def run(self, rank=False):
|
def run(self, rank=False):
|
||||||
for op in self.operations.keys():
|
pkgs = []
|
||||||
if op == "install":
|
for key in self.operations.keys():
|
||||||
self.install()
|
if key == "install":
|
||||||
elif op == "localInstall":
|
for pkg in self.operations[key]:
|
||||||
self.install(local=True)
|
pkgs.extend([pkg["package"]])
|
||||||
elif op == "remove":
|
self.install(pkgs)
|
||||||
self.tracker.total(len(self.operations["remove"]))
|
elif key == "localInstall":
|
||||||
self.remove()
|
for pkg in self.operations[key]:
|
||||||
|
pkgs.extend([pkg["package"]])
|
||||||
|
self.install(pkgs,local=True)
|
||||||
|
elif key == "remove":
|
||||||
|
for pkg in self.operations[key]:
|
||||||
|
pkgs.extend([pkg["package"]])
|
||||||
|
self.tracker.total(len(pkgs))
|
||||||
|
self.remove(pkgs)
|
||||||
|
elif key == "try_install":
|
||||||
|
for pkg in self.operations[key]:
|
||||||
|
pkgs.extend([pkg["package"]])
|
||||||
|
self.install(pkgs)
|
||||||
|
elif key == "try_remove":
|
||||||
|
for pkg in self.operations[key]:
|
||||||
|
pkgs.extend([pkg["package"]])
|
||||||
|
self.remove(pkgs)
|
||||||
|
|
||||||
self.init_keyring()
|
self.init_keyring()
|
||||||
self.populate_keyring()
|
self.populate_keyring()
|
||||||
|
Loading…
Reference in New Issue
Block a user