[postcfg] add temp some code for officechooser module
This commit is contained in:
parent
26c1f01b87
commit
d0531c8beb
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# === This file is part of Calamares - <http://github.com/calamares> ===
|
# === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
#
|
#
|
||||||
# Copyright 2014 - 2018, Philip Müller <philm@manjaro.org>
|
# Copyright 2014 - 2019, Philip Müller <philm@manjaro.org>
|
||||||
# Copyright 2016, Artoo <artoo@manjaro.org>
|
# Copyright 2016, Artoo <artoo@manjaro.org>
|
||||||
#
|
#
|
||||||
# Calamares is free software: you can redistribute it and/or modify
|
# Calamares is free software: you can redistribute it and/or modify
|
||||||
@ -62,6 +62,12 @@ class ConfigController:
|
|||||||
if exists(join(self.root, path)):
|
if exists(join(self.root, path)):
|
||||||
target_env_call(['pacman', '-R', '--noconfirm', pkg])
|
target_env_call(['pacman', '-R', '--noconfirm', pkg])
|
||||||
|
|
||||||
|
def umount(self, mp):
|
||||||
|
call(["umount", "-l", join(self.root, mp)])
|
||||||
|
|
||||||
|
def mount(self, mp):
|
||||||
|
call(["mount", "-Br", "/" + mp, join(self.root, mp)])
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.init_keyring()
|
self.init_keyring()
|
||||||
self.populate_keyring()
|
self.populate_keyring()
|
||||||
@ -105,6 +111,19 @@ class ConfigController:
|
|||||||
if exists(join(self.root, "usr/bin/grub-set-bootflag")):
|
if exists(join(self.root, "usr/bin/grub-set-bootflag")):
|
||||||
target_env_call(["grub-editenv", "-", "set", "menu_auto_hide=1", "boot_success=1"])
|
target_env_call(["grub-editenv", "-", "set", "menu_auto_hide=1", "boot_success=1"])
|
||||||
|
|
||||||
|
# Install Office Suite if selected (WIP)
|
||||||
|
office_package = libcalamares.globalstorage.value("packagechooser_officechooser")
|
||||||
|
if not office_package:
|
||||||
|
libcalamares.utils.warning("no office suite selected, {!s}".format(office_package))
|
||||||
|
else:
|
||||||
|
# For PoC we added the Office Packages to mhwd-live overlay in 18.1-rc7
|
||||||
|
cmd = ["pacman", "-S", office_package, "--config", "/opt/pacman-mhwd.conf" ]
|
||||||
|
self.mount("opt")
|
||||||
|
self.mount("etc/resolv.conf")
|
||||||
|
target_env_call(cmd)
|
||||||
|
self.umount("opt")
|
||||||
|
self.umount("etc/resolv.conf")
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user