commit
dd670f7c44
@ -474,6 +474,14 @@ def run():
|
|||||||
libcalamares.utils.warning( "EFI system, but nothing mounted on {!s}".format(efi_system_partition) )
|
libcalamares.utils.warning( "EFI system, but nothing mounted on {!s}".format(efi_system_partition) )
|
||||||
return None
|
return None
|
||||||
|
|
||||||
prepare_bootloader(fw_type)
|
try:
|
||||||
|
prepare_bootloader(fw_type)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
libcalamares.utils.warning(str(e))
|
||||||
|
libcalamares.utils.debug("stdout:" + str(e.stdout))
|
||||||
|
libcalamares.utils.debug("stderr:" + str(e.stderr))
|
||||||
|
return (_("Bootloader installation error"),
|
||||||
|
_("The bootloader could not be installed. The installation command <pre>{!s}</pre> returned error code {!s}.")
|
||||||
|
.format(e.cmd, e.returncode))
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
@ -372,15 +372,23 @@ def run():
|
|||||||
root_btrfs = (root_partitions[0] == "btrfs") if root_partitions else False
|
root_btrfs = (root_partitions[0] == "btrfs") if root_partitions else False
|
||||||
if root_btrfs:
|
if root_btrfs:
|
||||||
partitions.append( dict(fs="swap", mountPoint=None, claimed=True, device="/swap/swapfile", uuid=None) )
|
partitions.append( dict(fs="swap", mountPoint=None, claimed=True, device="/swap/swapfile", uuid=None) )
|
||||||
else:
|
else:
|
||||||
partitions.append( dict(fs="swap", mountPoint=None, claimed=True, device="/swapfile", uuid=None) )
|
partitions.append( dict(fs="swap", mountPoint=None, claimed=True, device="/swapfile", uuid=None) )
|
||||||
else:
|
else:
|
||||||
swap_choice = None
|
swap_choice = None
|
||||||
|
|
||||||
libcalamares.job.setprogress(0.1)
|
libcalamares.job.setprogress(0.1)
|
||||||
mount_options = conf["mountOptions"]
|
mount_options = conf.get("mountOptions", {})
|
||||||
ssd_extra_mount_options = conf.get("ssdExtraMountOptions", {})
|
ssd_extra_mount_options = conf.get("ssdExtraMountOptions", {})
|
||||||
crypttab_options = conf.get("crypttabOptions", "luks")
|
crypttab_options = conf.get("crypttabOptions", "luks")
|
||||||
|
|
||||||
|
# We rely on mount_options having a default; if there wasn't one,
|
||||||
|
# bail out with a meaningful error.
|
||||||
|
if not mount_options:
|
||||||
|
return (_("Configuration Error"),
|
||||||
|
_("No <pre>{!s}</pre> configuration is given for <pre>{!s}</pre> to use.")
|
||||||
|
.format("mountOptions", "fstab"))
|
||||||
|
|
||||||
generator = FstabGenerator(partitions,
|
generator = FstabGenerator(partitions,
|
||||||
root_mount_point,
|
root_mount_point,
|
||||||
mount_options,
|
mount_options,
|
||||||
|
@ -579,11 +579,27 @@ def run():
|
|||||||
|
|
||||||
update_db = libcalamares.job.configuration.get("update_db", False)
|
update_db = libcalamares.job.configuration.get("update_db", False)
|
||||||
if update_db and libcalamares.globalstorage.value("hasInternet"):
|
if update_db and libcalamares.globalstorage.value("hasInternet"):
|
||||||
pkgman.update_db()
|
try:
|
||||||
|
pkgman.update_db()
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
libcalamares.utils.warning(str(e))
|
||||||
|
libcalamares.utils.debug("stdout:" + str(e.stdout))
|
||||||
|
libcalamares.utils.debug("stderr:" + str(e.stderr))
|
||||||
|
return (_("Package Manager error"),
|
||||||
|
_("The package manager could not prepare updates. The command <pre>{!s}</pre> returned error code {!s}.")
|
||||||
|
.format(e.cmd, e.returncode))
|
||||||
|
|
||||||
update_system = libcalamares.job.configuration.get("update_system", False)
|
update_system = libcalamares.job.configuration.get("update_system", False)
|
||||||
if update_system and libcalamares.globalstorage.value("hasInternet"):
|
if update_system and libcalamares.globalstorage.value("hasInternet"):
|
||||||
pkgman.update_system()
|
try:
|
||||||
|
pkgman.update_system()
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
libcalamares.utils.warning(str(e))
|
||||||
|
libcalamares.utils.debug("stdout:" + str(e.stdout))
|
||||||
|
libcalamares.utils.debug("stderr:" + str(e.stderr))
|
||||||
|
return (_("Package Manager error"),
|
||||||
|
_("The package manager could not update the system. The command <pre>{!s}</pre> returned error code {!s}.")
|
||||||
|
.format(e.cmd, e.returncode))
|
||||||
|
|
||||||
operations = libcalamares.job.configuration.get("operations", [])
|
operations = libcalamares.job.configuration.get("operations", [])
|
||||||
if libcalamares.globalstorage.contains("packageOperations"):
|
if libcalamares.globalstorage.contains("packageOperations"):
|
||||||
@ -603,11 +619,18 @@ def run():
|
|||||||
for entry in operations:
|
for entry in operations:
|
||||||
group_packages = 0
|
group_packages = 0
|
||||||
libcalamares.utils.debug(pretty_name())
|
libcalamares.utils.debug(pretty_name())
|
||||||
run_operations(pkgman, entry)
|
try:
|
||||||
|
run_operations(pkgman, entry)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
libcalamares.utils.warning(str(e))
|
||||||
|
libcalamares.utils.debug("stdout:" + str(e.stdout))
|
||||||
|
libcalamares.utils.debug("stderr:" + str(e.stderr))
|
||||||
|
return (_("Package Manager error"),
|
||||||
|
_("The package manager could make changes to the installed system. The command <pre>{!s}</pre> returned error code {!s}.")
|
||||||
|
.format(e.cmd, e.returncode))
|
||||||
|
|
||||||
mode_packages = None
|
mode_packages = None
|
||||||
|
|
||||||
libcalamares.job.setprogress(1.0)
|
libcalamares.job.setprogress(1.0)
|
||||||
libcalamares.utils.debug(pretty_name())
|
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user