From 28efe2b85ab4f4600c9338edece6e21c088e2434 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 25 Jan 2019 07:53:39 -0500 Subject: [PATCH] [unpackfs] Log messages in English, too - For debugging purposes, need to log the message in English before returning the (user-visible) error description. --- src/modules/unpackfs/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 20e4ac74d..033d24edb 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -293,11 +293,13 @@ def run(): root_mount_point = globalstorage.value("rootMountPoint") if not root_mount_point: + utils.warning("No mount point for root partition") return (_("No mount point for root partition"), _("globalstorage does not contain a \"rootMountPoint\" key, " "doing nothing")) if not os.path.exists(root_mount_point): + utils.warning("Bad root mount point \"{}\"".format(root_mount_point)) return (_("Bad mount point for root partition"), _("rootMountPoint is \"{}\", which does not " "exist, doing nothing").format(root_mount_point)) @@ -311,16 +313,19 @@ def run(): sourcefs = entry["sourcefs"] if sourcefs not in supported_filesystems: + utils.warning("The filesystem for \"{}\" ({}) is not supported".format(source, sourcefs)) return (_("Bad unsquash configuration"), _("The filesystem for \"{}\" ({}) is not supported").format(source, sourcefs)) destination = os.path.abspath(root_mount_point + entry["destination"]) if not os.path.exists(source): + utils.warning("The source filesystem \"{}\" does not exist".format(source)) return (_("Bad unsquash configuration"), _("The source filesystem \"{}\" does not exist").format(source)) if not os.path.isdir(destination): + utils.warning(("The destination \"{}\" in the target system is not a directory").format(destination)) return (_("Bad unsquash configuration"), _("The destination \"{}\" in the target system is not a directory").format(destination))