From 7ed74cefa1381612b617cfb7083293eb0af40fde Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 12 Feb 2019 08:25:24 -0500 Subject: [PATCH 01/20] CMake: bump version --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc7d91d43..e3740c141 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,8 +75,8 @@ set( CALAMARES_DESCRIPTION_SUMMARY set( CALAMARES_VERSION_MAJOR 3 ) set( CALAMARES_VERSION_MINOR 2 ) -set( CALAMARES_VERSION_PATCH 4 ) -set( CALAMARES_VERSION_RC 0 ) +set( CALAMARES_VERSION_PATCH 5 ) +set( CALAMARES_VERSION_RC 1 ) ### Transifex (languages) info From 0f80a6295bc4177f4a61f8b009e72de9190e5c77 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 12 Feb 2019 17:11:01 +0100 Subject: [PATCH 02/20] [libcalamares] Reduce warnings about trailing ; --- src/libcalamares/utils/NamedEnum.h | 2 +- src/modules/locale/LocaleConfiguration.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcalamares/utils/NamedEnum.h b/src/libcalamares/utils/NamedEnum.h index 69abf4bd1..047ae6f19 100644 --- a/src/libcalamares/utils/NamedEnum.h +++ b/src/libcalamares/utils/NamedEnum.h @@ -51,7 +51,7 @@ struct NamedEnumTable * * static const NamedEnumTable c{ {"red", Colors::Red } }; */ - NamedEnumTable( const std::initializer_list< pair_t >& v ) : table( v ) { /* static_assert( v.size() > 0 ); */ }; + NamedEnumTable( const std::initializer_list< pair_t >& v ) : table( v ) { /* static_assert( v.size() > 0 ); */ } /** @brief Find a name @p s in the table. * diff --git a/src/modules/locale/LocaleConfiguration.h b/src/modules/locale/LocaleConfiguration.h index abe90ffcb..5e99b1f37 100644 --- a/src/modules/locale/LocaleConfiguration.h +++ b/src/modules/locale/LocaleConfiguration.h @@ -31,7 +31,7 @@ public: explicit LocaleConfiguration(); /// @brief Create a locale with everything set to the given @p localeName explicit LocaleConfiguration( const QString& localeName /* "en_US.UTF-8" */ ) - : LocaleConfiguration( localeName, localeName ) { }; + : LocaleConfiguration( localeName, localeName ) { } /// @brief Create a locale with language and formats separate explicit LocaleConfiguration( const QString& localeName, const QString& formatsName ); From 4178d5841c9486399bfa65232f68f6c915b1956d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 Feb 2019 12:36:17 +0100 Subject: [PATCH 03/20] [modules] Enable translations on some Python modules - Python modules should have human-readable names, which means that the description should be translated in `pretty_name()` --- src/modules/machineid/main.py | 1 + src/modules/plymouthcfg/main.py | 11 +++++++++++ src/modules/removeuser/main.py | 11 +++++++++++ 3 files changed, 23 insertions(+) diff --git a/src/modules/machineid/main.py b/src/modules/machineid/main.py index c4c473246..092fc7196 100644 --- a/src/modules/machineid/main.py +++ b/src/modules/machineid/main.py @@ -6,6 +6,7 @@ # Copyright 2014, Kevin Kofler # Copyright 2016, Philip Müller # Copyright 2017, Alf Gaida +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/modules/plymouthcfg/main.py b/src/modules/plymouthcfg/main.py index 6f1128b7e..e224f5df0 100644 --- a/src/modules/plymouthcfg/main.py +++ b/src/modules/plymouthcfg/main.py @@ -6,6 +6,7 @@ # Copyright 2016, Artoo # Copyright 2017, Alf Gaida # Copyright 2018, Gabriel Craciunescu +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,6 +25,16 @@ import libcalamares from libcalamares.utils import debug, target_env_call +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configure Plymouth theme") + class PlymouthController: diff --git a/src/modules/removeuser/main.py b/src/modules/removeuser/main.py index 9acc20b54..bd876edcd 100644 --- a/src/modules/removeuser/main.py +++ b/src/modules/removeuser/main.py @@ -5,6 +5,7 @@ # # Copyright 2015, Teo Mrnjavac # Copyright 2017. Alf Gaida +# Copyright 2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,6 +23,16 @@ import subprocess import libcalamares +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Remove live user from target system") + def run(): """ From c9f89e292974cc65c9e2705514e8ba10f5797166 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 Feb 2019 15:29:04 +0100 Subject: [PATCH 04/20] [modules] Translate name of services-* modules. --- src/modules/services-openrc/main.py | 13 ++++++++++++- src/modules/services-systemd/main.py | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/modules/services-openrc/main.py b/src/modules/services-openrc/main.py index c3e14b481..34f80cdf2 100644 --- a/src/modules/services-openrc/main.py +++ b/src/modules/services-openrc/main.py @@ -6,7 +6,7 @@ # Copyright 2016, Artoo # Copyright 2017, Philip Müller # Copyright 2018, Artoo -# Copyright 2018, Adriaan de Groot +# Copyright 2018-2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,6 +27,17 @@ from libcalamares.utils import target_env_call, warning from os.path import exists, join +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configure OpenRC services") + + class OpenrcController: """ This is the openrc service controller. diff --git a/src/modules/services-systemd/main.py b/src/modules/services-systemd/main.py index 09263b9f0..7367f988c 100644 --- a/src/modules/services-systemd/main.py +++ b/src/modules/services-systemd/main.py @@ -6,7 +6,7 @@ # Copyright 2014, Philip Müller # Copyright 2014, Teo Mrnjavac # Copyright 2017, Alf Gaida -# Copyright 2018, Adriaan de Groot +# Copyright 2018-2019, Adriaan de Groot # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,6 +24,17 @@ import libcalamares +import gettext +_ = gettext.translation("calamares-python", + localedir=libcalamares.utils.gettext_path(), + languages=libcalamares.utils.gettext_languages(), + fallback=True).gettext + + +def pretty_name(): + return _("Configure systemd services") + + def systemctl(targets, command, suffix): """ For each entry in @p targets, run "systemctl ", From 544c1b708c1518117edf40047200cdf1dcd50c2f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 Feb 2019 18:50:29 +0100 Subject: [PATCH 05/20] [services-openrc] Make user-visible messages translatable --- src/modules/services-openrc/main.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/modules/services-openrc/main.py b/src/modules/services-openrc/main.py index 34f80cdf2..46890dd98 100644 --- a/src/modules/services-openrc/main.py +++ b/src/modules/services-openrc/main.py @@ -80,24 +80,22 @@ class OpenrcController: if exists(runlevel_path): ec = target_env_call(["rc-update", state, name, runlevel]) if ec != 0: + warning("Cannot {} service {} to {}".format(state, name, runlevel)) + warning("rc-update returned error code {!s}".format(ec)) if mandatory: - return ("Cannot {} service {} to {}".format(state, name, runlevel), - "rc-update {} call in chroot returned error code {}".format(state, ec) + return (_("Cannot {} service {} to {}").format(state, name, runlevel), + _("rc-update {} call in chroot returned error code {}").format(state, ec) ) - else: - warning("Could not {} service {} in {}, error {!s}".format(state, name, runlevel, ec)) else: + warning("Target runlevel {} does not exist for {}.".format(runlevel, name)) if mandatory: - return ("Target runlevel {} does not exist for {}.".format(runlevel, name), - "No {} found.".format(runlevel_path)) - else: - warning("Target runlevel {} does not exist for {}.".format(runlevel, name)) + return (_("Target runlevel {} does not exist for {}.").format(runlevel, name), + _("No {} found.").format(runlevel_path)) else: + warning("Target service {} does not exist in {}.".format(name, self.initdDir)) if mandatory: - return ("Target service {} does not exist.".format(name), - "No {} found.".format(service_path)) - else: - warning("Target service {} does not exist in {}.".format(name, self.initdDir)) + return (_("Target service {} does not exist.").format(name), + _("No {} found.").format(service_path)) def run(self): From b7c77e7323f4a972ff5de427c27c2832a3befb5c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 Feb 2019 18:52:19 +0100 Subject: [PATCH 06/20] [services-systemd] Make user-visible messages translatable --- src/modules/services-systemd/main.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/modules/services-systemd/main.py b/src/modules/services-systemd/main.py index 7367f988c..1cb5899ae 100644 --- a/src/modules/services-systemd/main.py +++ b/src/modules/services-systemd/main.py @@ -58,17 +58,16 @@ def systemctl(targets, command, suffix): ) if ec != 0: + libcalamares.utils.warning( + "Cannot {} systemd {} {}".format(command, suffix, name) + ) + libcalamares.utils.warning( + "systemctl {} call in chroot returned error code {}".format(command, ec) + ) if mandatory: - return ("Cannot {} systemd {} {}".format(command, suffix, name), - "systemctl {} call in chroot returned error code {}".format(command, ec) + return (_("Cannot {} systemd {} {}").format(command, suffix, name), + _("systemctl {} call in chroot returned error code {}").format(command, ec) ) - else: - libcalamares.utils.warning( - "Cannot {} systemd {} {}".format(command, suffix, name) - ) - libcalamares.utils.warning( - "systemctl {} call in chroot returned error code {}".format(command, ec) - ) return None @@ -103,6 +102,4 @@ def run(): if r is not None: return r - - # This could have just been return r return None From 6fbc467795cb7f524133070526a46f09011759b3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 Feb 2019 16:08:55 -0500 Subject: [PATCH 07/20] [partition] Reduce Transifex warnings - the string here has no context (no QObject-derived class that it is called in) so use the static method instead. --- src/modules/partition/gui/PartitionDialogHelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/gui/PartitionDialogHelpers.cpp b/src/modules/partition/gui/PartitionDialogHelpers.cpp index 3dcf41f58..02d91ca4b 100644 --- a/src/modules/partition/gui/PartitionDialogHelpers.cpp +++ b/src/modules/partition/gui/PartitionDialogHelpers.cpp @@ -44,7 +44,7 @@ void standardMountPoints(QComboBox& combo) { combo.clear(); - combo.addItem( combo.tr( "(no mount point)" ) ); + combo.addItem( QObject::tr( "(no mount point)" ) ); combo.addItems( standardMountPoints() ); } From 723358e145e48c0f4b14cb8d1d4c2620f50b3203 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 Feb 2019 16:12:43 -0500 Subject: [PATCH 08/20] [partition] Reduce Transifex warnings - Add a (superfluous, since they don't have their own signals or slots) Q_OBJECT macro to the VG jobs, to silence a Transifex warning (this does make sure that the tool knows about the context for the translated messages) --- src/modules/partition/jobs/CreateVolumeGroupJob.h | 1 + src/modules/partition/jobs/DeactivateVolumeGroupJob.h | 1 + src/modules/partition/jobs/RemoveVolumeGroupJob.h | 1 + src/modules/partition/jobs/ResizeVolumeGroupJob.h | 1 + 4 files changed, 4 insertions(+) diff --git a/src/modules/partition/jobs/CreateVolumeGroupJob.h b/src/modules/partition/jobs/CreateVolumeGroupJob.h index 9e84fba73..6f85eaab8 100644 --- a/src/modules/partition/jobs/CreateVolumeGroupJob.h +++ b/src/modules/partition/jobs/CreateVolumeGroupJob.h @@ -27,6 +27,7 @@ class CreateVolumeGroupJob : public Calamares::Job { + Q_OBJECT public: CreateVolumeGroupJob( QString& vgName, QVector< const Partition* > pvList, const qint32 peSize ); diff --git a/src/modules/partition/jobs/DeactivateVolumeGroupJob.h b/src/modules/partition/jobs/DeactivateVolumeGroupJob.h index 5b59c2c4f..17be7cdef 100644 --- a/src/modules/partition/jobs/DeactivateVolumeGroupJob.h +++ b/src/modules/partition/jobs/DeactivateVolumeGroupJob.h @@ -25,6 +25,7 @@ class LvmDevice; class DeactivateVolumeGroupJob : public Calamares::Job { + Q_OBJECT public: DeactivateVolumeGroupJob( LvmDevice* device ); diff --git a/src/modules/partition/jobs/RemoveVolumeGroupJob.h b/src/modules/partition/jobs/RemoveVolumeGroupJob.h index 426dde7fb..009e6f44d 100644 --- a/src/modules/partition/jobs/RemoveVolumeGroupJob.h +++ b/src/modules/partition/jobs/RemoveVolumeGroupJob.h @@ -25,6 +25,7 @@ class LvmDevice; class RemoveVolumeGroupJob : public Calamares::Job { + Q_OBJECT public: RemoveVolumeGroupJob( LvmDevice* device ); diff --git a/src/modules/partition/jobs/ResizeVolumeGroupJob.h b/src/modules/partition/jobs/ResizeVolumeGroupJob.h index 380bee416..fb0ff715b 100644 --- a/src/modules/partition/jobs/ResizeVolumeGroupJob.h +++ b/src/modules/partition/jobs/ResizeVolumeGroupJob.h @@ -28,6 +28,7 @@ class Partition; class ResizeVolumeGroupJob : public Calamares::Job { + Q_OBJECT public: ResizeVolumeGroupJob( LvmDevice* device, QVector< const Partition* >& partitionList ); From 879c5e3ceee2309b3a2e653389f6f98daf101aa5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 15 Feb 2019 00:08:02 +0100 Subject: [PATCH 09/20] Changes: start notes for next release --- CHANGES | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES b/CHANGES index 70e7ec8c9..b893b76bd 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,15 @@ contributors are listed. Note that Calamares does not have a historical changelog -- this log starts with version 3.2.0. The release notes on the website will have to do for older versions. +# 3.2.5 (unreleased) # + +This release contains contributions from (alphabetically by first name): + +## Core ## + +## Modules ## + + # 3.2.4 (2019-02-12) # This release contains contributions from (alphabetically by first name): @@ -66,6 +75,7 @@ This release contains contributions from (alphabetically by first name): the installation media to the target stystem. This can be used, for instance, for block-level-identical installations. + # 3.2.3 (2019-01-09) # This release contains contributions from (alphabetically by first name): From 946c5a493f53c517b90e58a18f1cffa5694093b7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 18 Feb 2019 06:27:36 -0500 Subject: [PATCH 10/20] [services-*] Fix translations - Strings like "{} the {} with {}" are terrible for translators: - no context - no possibility to re-order grammatical units - substituting in English parts-of-speech is going to make a mess - Write the strings out with explicitly named substitutions, no part-of-speech substitution, and better formatting. --- src/modules/services-openrc/main.py | 37 +++++++++++++++++++++++----- src/modules/services-systemd/main.py | 20 +++++++++++++-- 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/src/modules/services-openrc/main.py b/src/modules/services-openrc/main.py index 46890dd98..23591fb84 100644 --- a/src/modules/services-openrc/main.py +++ b/src/modules/services-openrc/main.py @@ -56,6 +56,22 @@ class OpenrcController: self.initdDir = libcalamares.job.configuration['initdDir'] self.runlevelsDir = libcalamares.job.configuration['runlevelsDir'] + + def make_failure_description(self, state, name, runlevel): + """ + Returns a generic "could not " failure message, specialized + for the action @p state and the specific service @p name in @p runlevel. + """ + if state == "add": + description = _("Cannot add service {name!s} to run-level {level!s}.") + elif state == "del": + description = _("Cannot remove service {name!s} from run-level {level!s}.") + else: + description = _("Unknown service-action {arg!s} for service {name!s} in run-level {level!s}.") + + return description.format(arg=state, name=name, level=runlevel) + + def update(self, state): """ Call rc-update for each service listed @@ -83,19 +99,28 @@ class OpenrcController: warning("Cannot {} service {} to {}".format(state, name, runlevel)) warning("rc-update returned error code {!s}".format(ec)) if mandatory: - return (_("Cannot {} service {} to {}").format(state, name, runlevel), - _("rc-update {} call in chroot returned error code {}").format(state, ec) + title = _("Cannot modify service") + diagnostic = _("rc-update {arg!s} call in chroot returned error code {num!s}.").format(arg=state, num=ec) + return (title, + self.make_failure_description(state, name, runlevel) + " " + diagnostic ) else: warning("Target runlevel {} does not exist for {}.".format(runlevel, name)) if mandatory: - return (_("Target runlevel {} does not exist for {}.").format(runlevel, name), - _("No {} found.").format(runlevel_path)) + title = _("Target runlevel does not exist") + diagnostic = _("The path for runlevel {level!s} is {path!s}, which does not exist.").format(level=runlevel, path=runlevel_path) + + return (title, + self.make_failure_description(state, name, runlevel) + " " + diagnostic + ) else: warning("Target service {} does not exist in {}.".format(name, self.initdDir)) if mandatory: - return (_("Target service {} does not exist.").format(name), - _("No {} found.").format(service_path)) + title = _("Target service does not exist") + diagnostic = _("The path for service {name!s} is {path!s}, which does not exist.").format(name=name, path=service_path) + return (title, + self.make_failure_description(state, name, runlevel) + " " + diagnostic + ) def run(self): diff --git a/src/modules/services-systemd/main.py b/src/modules/services-systemd/main.py index 1cb5899ae..cd13d9ce9 100644 --- a/src/modules/services-systemd/main.py +++ b/src/modules/services-systemd/main.py @@ -65,8 +65,24 @@ def systemctl(targets, command, suffix): "systemctl {} call in chroot returned error code {}".format(command, ec) ) if mandatory: - return (_("Cannot {} systemd {} {}").format(command, suffix, name), - _("systemctl {} call in chroot returned error code {}").format(command, ec) + title = _("Cannot modify service") + diagnostic = _("systemctl {arg!s} call in chroot returned error code {num!s}.").format(arg=command, num=ec) + + if command == "enable" and suffix == ".service": + description = _("Cannot enable systemd service {name!s}.") + elif command == "enable" and suffix == ".target": + description = _("Cannot enable systemd target {name!s}.") + elif command == "disable" and suffix == ".service": + description = _("Cannot enable systemd service {name!s}.") + elif command == "disable" and suffix == ".target": + description = _("Cannot disable systemd target {name!s}.") + elif command == "mask": + description = _("Cannot mask systemd unit {name!s}.") + else: + description = _("Unknown systemd commands {command!s} and {suffix!s} for unit {name!s}.") + + return (title, + description.format(name=name, command=command, suffix=suffix) + " " + diagnostic ) return None From cbc0100add0ffa1bf277b9dd37149db413b89876 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 18 Feb 2019 08:52:52 -0500 Subject: [PATCH 11/20] Changes: mention updated Python-module translations --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index b893b76bd..b0a823883 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,10 @@ This release contains contributions from (alphabetically by first name): ## Modules ## + * Python modules: several modules have had translations added. This is + usually only visible when the module runs as part of the *exec* step, + when the module's *pretty name* is displayed. In addition, error + messages are now translated. # 3.2.4 (2019-02-12) # From 651b52ead94c34e9f3d91f281f880b22d5252f43 Mon Sep 17 00:00:00 2001 From: Dan Simmons Date: Wed, 20 Feb 2019 05:00:58 -0500 Subject: [PATCH 12/20] Fix spelling typo --- src/modules/partition/gui/ChoicePage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 7c980cf49..21783c251 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -1248,7 +1248,7 @@ ChoicePage::setupActions() } if ( PartUtils::canBeReplaced( *it ) ) { - cDebug() << ".. contains replacable" << it; + cDebug() << ".. contains replaceable" << it; atLeastOneCanBeReplaced = true; } if ( (*it)->isMounted() ) From 3ea6c6cfbec8d303a6ebe1dba2e154091e0fd43c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 21 Feb 2019 06:40:49 -0500 Subject: [PATCH 13/20] [users] Rename badly-named variable --- src/modules/users/CreateUserJob.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp index 052af87c6..d7e356231 100644 --- a/src/modules/users/CreateUserJob.cpp +++ b/src/modules/users/CreateUserJob.cpp @@ -154,29 +154,29 @@ CreateUserJob::exec() useradd << "-c" << m_fullName; useradd << m_userName; - auto pres = CalamaresUtils::System::instance()->targetEnvCommand( useradd ); - if ( pres.getExitCode() ) + auto commandResult = CalamaresUtils::System::instance()->targetEnvCommand( useradd ); + if ( commandResult.getExitCode() ) { - cError() << "useradd failed" << pres.getExitCode(); - return pres.explainProcess( useradd, 10 /* bogus timeout */ ); + cError() << "useradd failed" << commandResult.getExitCode(); + return commandResult.explainProcess( useradd, 10 /* bogus timeout */ ); } - pres = CalamaresUtils::System::instance()->targetEnvCommand( + commandResult = CalamaresUtils::System::instance()->targetEnvCommand( { "usermod", "-aG", defaultGroups, m_userName } ); - if ( pres.getExitCode() ) + if ( commandResult.getExitCode() ) { - cError() << "usermod failed" << pres.getExitCode(); - return pres.explainProcess( "usermod", 10 ); + cError() << "usermod failed" << commandResult.getExitCode(); + return commandResult.explainProcess( "usermod", 10 ); } QString userGroup = QString( "%1:%2" ).arg( m_userName ).arg( m_userName ); QString homeDir = QString( "/home/%1" ).arg( m_userName ); - pres = CalamaresUtils::System::instance()->targetEnvCommand( + commandResult = CalamaresUtils::System::instance()->targetEnvCommand( { "chown", "-R", userGroup, homeDir } ); - if ( pres.getExitCode() ) + if ( commandResult.getExitCode() ) { - cError() << "chown failed" << pres.getExitCode(); - return pres.explainProcess( "chown", 10 ); + cError() << "chown failed" << commandResult.getExitCode(); + return commandResult.explainProcess( "chown", 10 ); } return Calamares::JobResult::ok(); From 586cb63ef5209bd532f1695bf89bc64816d6fe7f Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Fri, 22 Feb 2019 12:58:55 +0100 Subject: [PATCH 14/20] [partition] use configured default filesystem type instead of ext4 When using the default partition layout (only a `/` partition), the filesystem used was ext4, ignoring the `defaultFileSystemType` configuration option. This commit fixes this bug, so that any supported filesystem can now be used for the default partitioning scheme. Fixes #1093 Signed-off-by: Arnaud Ferraris --- .../partition/core/PartitionLayout.cpp | 22 ++++++++++++++++++- src/modules/partition/core/PartitionLayout.h | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index c2489620f..a17e764e8 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -18,6 +18,9 @@ * along with Calamares. If not, see . */ +#include "GlobalStorage.h" +#include "JobQueue.h" + #include "core/PartitionLayout.h" #include "core/KPMHelpers.h" @@ -28,17 +31,32 @@ #include #include +static int +getDefaultFileSystemType() +{ + Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); + int defaultFs = FileSystem::typeForName( gs->value( "defaultFileSystemType" ).toString() ); + + if ( defaultFs == FileSystem::Unknown ) + defaultFs = FileSystem::Ext4; + + return defaultFs; +} + PartitionLayout::PartitionLayout() { + defaultFsType = getDefaultFileSystemType(); } PartitionLayout::PartitionLayout( PartitionLayout::PartitionEntry entry ) { + defaultFsType = getDefaultFileSystemType(); partLayout.append( entry ); } PartitionLayout::PartitionLayout( const PartitionLayout& layout ) : partLayout( layout.partLayout ) + , defaultFsType( layout.defaultFsType ) { } @@ -115,7 +133,7 @@ PartitionLayout::addEntry( const QString& mountPoint, const QString& size, const PartitionLayout::PartitionEntry entry( size, min ); entry.partMountPoint = mountPoint; - entry.partFileSystem = FileSystem::Ext4; + entry.partFileSystem = defaultFsType; partLayout.append( entry ); } @@ -128,6 +146,8 @@ PartitionLayout::addEntry( const QString& label, const QString& mountPoint, cons entry.partLabel = label; entry.partMountPoint = mountPoint; entry.partFileSystem = FileSystem::typeForName( fs ); + if ( entry.partFileSystem == FileSystem::Unknown ) + entry.partFileSystem = defaultFsType; partLayout.append( entry ); } diff --git a/src/modules/partition/core/PartitionLayout.h b/src/modules/partition/core/PartitionLayout.h index 5e216122c..63ea8d9ec 100644 --- a/src/modules/partition/core/PartitionLayout.h +++ b/src/modules/partition/core/PartitionLayout.h @@ -76,6 +76,7 @@ public: QList< Partition* > execute( Device *dev, qint64 firstSector, qint64 lastSector, QString luksPassphrase, PartitionNode* parent, const PartitionRole& role ); private: + int defaultFsType; QList< PartitionEntry > partLayout; }; From 79c20b8fbd6ca072c0e301d79dc36a359dac9d86 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 22 Feb 2019 07:03:38 -0500 Subject: [PATCH 15/20] [partition] Fix user-visible strings - The default window title in the designer file wasn't a good string to translate. Use one of the titles instanced from elsewhere. - The window titles set in subclasses were not translatable. FIXES #1092 --- src/modules/partition/gui/CreateVolumeGroupDialog.cpp | 2 +- src/modules/partition/gui/ResizeVolumeGroupDialog.cpp | 2 +- src/modules/partition/gui/VolumeGroupBaseDialog.ui | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/partition/gui/CreateVolumeGroupDialog.cpp b/src/modules/partition/gui/CreateVolumeGroupDialog.cpp index fe5c40be8..a255e9902 100644 --- a/src/modules/partition/gui/CreateVolumeGroupDialog.cpp +++ b/src/modules/partition/gui/CreateVolumeGroupDialog.cpp @@ -34,7 +34,7 @@ CreateVolumeGroupDialog::CreateVolumeGroupDialog( QString& vgName, , m_selectedPVs( selectedPVs ) , m_peSize( pSize ) { - setWindowTitle( "Create Volume Group" ); + setWindowTitle( tr( "Create Volume Group" ) ); peSize()->setValue( pSize ); diff --git a/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp b/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp index b3173096d..35b6bbdf1 100644 --- a/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp +++ b/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp @@ -35,7 +35,7 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog( LvmDevice *device, : VolumeGroupBaseDialog( device->name(), device->physicalVolumes(), parent ) , m_selectedPVs( selectedPVs ) { - setWindowTitle( "Resize Volume Group" ); + setWindowTitle( tr( "Resize Volume Group" ) ); for ( int i = 0; i < pvList()->count(); i++ ) pvList()->item(i)->setCheckState( Qt::Checked ); diff --git a/src/modules/partition/gui/VolumeGroupBaseDialog.ui b/src/modules/partition/gui/VolumeGroupBaseDialog.ui index b45d204e2..f84cf22d0 100644 --- a/src/modules/partition/gui/VolumeGroupBaseDialog.ui +++ b/src/modules/partition/gui/VolumeGroupBaseDialog.ui @@ -11,7 +11,7 @@ - VolumeGroupDialog + Create Volume Group From 5084c44b54784a03b6c9751ea1c109cff0cd161f Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Fri, 22 Feb 2019 13:08:59 +0100 Subject: [PATCH 16/20] [partition] fix naming of PartitionLayout class member variables Signed-off-by: Arnaud Ferraris --- .../partition/core/PartitionLayout.cpp | 22 +++++++++---------- src/modules/partition/core/PartitionLayout.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index a17e764e8..f6521cea7 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -45,18 +45,18 @@ getDefaultFileSystemType() PartitionLayout::PartitionLayout() { - defaultFsType = getDefaultFileSystemType(); + m_defaultFsType = getDefaultFileSystemType(); } PartitionLayout::PartitionLayout( PartitionLayout::PartitionEntry entry ) { - defaultFsType = getDefaultFileSystemType(); - partLayout.append( entry ); + m_defaultFsType = getDefaultFileSystemType(); + m_partLayout.append( entry ); } PartitionLayout::PartitionLayout( const PartitionLayout& layout ) - : partLayout( layout.partLayout ) - , defaultFsType( layout.defaultFsType ) + : m_partLayout( layout.m_partLayout ) + , m_defaultFsType( layout.m_defaultFsType ) { } @@ -67,7 +67,7 @@ PartitionLayout::~PartitionLayout() void PartitionLayout::addEntry( PartitionLayout::PartitionEntry entry ) { - partLayout.append( entry ); + m_partLayout.append( entry ); } static double @@ -133,9 +133,9 @@ PartitionLayout::addEntry( const QString& mountPoint, const QString& size, const PartitionLayout::PartitionEntry entry( size, min ); entry.partMountPoint = mountPoint; - entry.partFileSystem = defaultFsType; + entry.partFileSystem = m_defaultFsType; - partLayout.append( entry ); + m_partLayout.append( entry ); } void @@ -147,9 +147,9 @@ PartitionLayout::addEntry( const QString& label, const QString& mountPoint, cons entry.partMountPoint = mountPoint; entry.partFileSystem = FileSystem::typeForName( fs ); if ( entry.partFileSystem == FileSystem::Unknown ) - entry.partFileSystem = defaultFsType; + entry.partFileSystem = m_defaultFsType; - partLayout.append( entry ); + m_partLayout.append( entry ); } static qint64 @@ -195,7 +195,7 @@ PartitionLayout::execute( Device *dev, qint64 firstSector, // TODO: Refine partition sizes to make sure there is room for every partition // Use a default (200-500M ?) minimum size for partition without minSize - foreach( const PartitionLayout::PartitionEntry& part, partLayout ) + foreach( const PartitionLayout::PartitionEntry& part, m_partLayout ) { Partition *currentPartition = nullptr; diff --git a/src/modules/partition/core/PartitionLayout.h b/src/modules/partition/core/PartitionLayout.h index 63ea8d9ec..f2a4cbff5 100644 --- a/src/modules/partition/core/PartitionLayout.h +++ b/src/modules/partition/core/PartitionLayout.h @@ -76,8 +76,8 @@ public: QList< Partition* > execute( Device *dev, qint64 firstSector, qint64 lastSector, QString luksPassphrase, PartitionNode* parent, const PartitionRole& role ); private: - int defaultFsType; - QList< PartitionEntry > partLayout; + int m_defaultFsType; + QList< PartitionEntry > m_partLayout; }; #endif /* PARTITIONLAYOUT_H */ From cd92b8dd5ef97bfd2f5b459987060b27d05b1618 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 22 Feb 2019 09:21:22 -0500 Subject: [PATCH 17/20] [libcalamares] Simplify logging code - log() was never called with a non-default value for toDisk, so simplify to true. Keep the if() around to indicate block scope. --- src/libcalamares/utils/Logger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcalamares/utils/Logger.cpp b/src/libcalamares/utils/Logger.cpp index 98aa2121f..b75fb6495 100644 --- a/src/libcalamares/utils/Logger.cpp +++ b/src/libcalamares/utils/Logger.cpp @@ -2,7 +2,7 @@ * * Copyright 2010-2011, Christian Muehlhaeuser * Copyright 2014, Teo Mrnjavac - * Copyright 2017-2018, Adriaan de Groot + * Copyright 2017-2019, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,9 +68,9 @@ logLevel() } static void -log( const char* msg, unsigned int debugLevel, bool toDisk = true ) +log( const char* msg, unsigned int debugLevel ) { - if ( toDisk || debugLevel < s_threshold ) + if ( true ) { QMutexLocker lock( &s_mutex ); From 355987bfa13343f32a5f85a52a51e0b3ad219b70 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 22 Feb 2019 10:47:20 -0500 Subject: [PATCH 18/20] CMake: QtConcurrent is required as well. SEE #1082 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3740c141..0aeb8a584 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,7 +240,7 @@ include( CMakeColors ) ### DEPENDENCIES # -find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core Gui Widgets LinguistTools Svg Quick QuickWidgets ) +find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Concurrent Core Gui Widgets LinguistTools Svg Quick QuickWidgets ) find_package( YAMLCPP ${YAMLCPP_VERSION} REQUIRED ) if( INSTALL_POLKIT ) find_package( PolkitQt5-1 REQUIRED ) From 74ead4c7bad673d6099d198f80a5524988264cde Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Fri, 22 Feb 2019 18:42:16 +0100 Subject: [PATCH 19/20] [partition] improve filesystem search operation Due to changes to the FileSsytem::typeForName() function, more processing is needed to deal with locales and different cases. This is done by refactoring the findFS() function, initially located in the PartitionViewStep class, and making it available to the whole module. Additionnally, more checks have been implemented regarding the use of global storage in the PartitionLayout class, and the filesystem types now use the correct FileSystem::Type, as requested. Signed-off-by: Arnaud Ferraris --- src/modules/partition/core/PartUtils.cpp | 50 ++++++++++++++ src/modules/partition/core/PartUtils.h | 13 ++++ .../partition/core/PartitionLayout.cpp | 21 +++--- src/modules/partition/core/PartitionLayout.h | 5 +- .../partition/gui/PartitionViewStep.cpp | 65 +++++-------------- 5 files changed, 94 insertions(+), 60 deletions(-) diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index d61064041..d09bcd149 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -408,6 +408,56 @@ isEfiBootable( const Partition* candidate ) flags.testFlag( PartitionTable::FlagBoot ); } +QString +findFS( QString fsName, FileSystem::Type* fsType ) +{ + QStringList fsLanguage { QLatin1Literal( "C" ) }; // Required language list to turn off localization + if ( fsName.isEmpty() ) + fsName = QStringLiteral( "ext4" ); + + FileSystem::Type tmpType = FileSystem::typeForName( fsName, fsLanguage ); + if ( tmpType != FileSystem::Unknown ) + { + cDebug() << "Found filesystem" << fsName; + if ( fsType ) + *fsType = tmpType; + return fsName; + } + + // Second pass: try case-insensitive + const auto fstypes = FileSystem::types(); + for ( FileSystem::Type t : fstypes ) + { + if ( 0 == QString::compare( fsName, FileSystem::nameForType( t, fsLanguage ), Qt::CaseInsensitive ) ) + { + QString fsRealName = FileSystem::nameForType( t, fsLanguage ); + cDebug() << "Filesystem name" << fsName << "translated to" << fsRealName; + if ( fsType ) + *fsType = t; + return fsRealName; + } + } + + cDebug() << "Filesystem" << fsName << "not found, using ext4"; + fsName = QStringLiteral( "ext4" ); + // fsType can be used to check whether fsName was a valid filesystem. + if (fsType) + *fsType = FileSystem::Unknown; +#ifdef DEBUG_FILESYSTEMS + // This bit is for distro's debugging their settings, and shows + // all the strings that KPMCore is matching against for FS type. + { + Logger::CDebug d; + using TR = Logger::DebugRow< int, QString >; + const auto fstypes = FileSystem::types(); + d << "Available types (" << fstypes.count() << ')'; + for ( FileSystem::Type t : fstypes ) + d << TR( static_cast( t ), FileSystem::nameForType( t, fsLanguage ) ); + } +#endif + return fsName; +} + } // nmamespace PartUtils /* Implementation of methods for FstabEntry, from OsproberEntry.h */ diff --git a/src/modules/partition/core/PartUtils.h b/src/modules/partition/core/PartUtils.h index b94e20567..c7da86c06 100644 --- a/src/modules/partition/core/PartUtils.h +++ b/src/modules/partition/core/PartUtils.h @@ -22,6 +22,10 @@ #include "OsproberEntry.h" +// KPMcore +#include + +// Qt #include class PartitionCoreModule; @@ -73,6 +77,15 @@ bool isEfiSystem(); * the partition table layout, this may mean different flags. */ bool isEfiBootable( const Partition* candidate ); + +/** @brief translate @p fsName into a recognized name and type + * + * Makes several attempts to translate the string into a + * name that KPMCore will recognize. + * The corresponding filesystem type is stored in @p fsType, and + * its value is FileSystem::Unknown if @p fsName is not recognized. + */ +QString findFS( QString fsName, FileSystem::Type* fsType ); } #endif // PARTUTILS_H diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index f6521cea7..39341fddd 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -26,21 +26,26 @@ #include "core/KPMHelpers.h" #include "core/PartitionActions.h" #include "core/PartitionInfo.h" +#include "core/PartUtils.h" #include #include #include -static int +static FileSystem::Type getDefaultFileSystemType() { Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - int defaultFs = FileSystem::typeForName( gs->value( "defaultFileSystemType" ).toString() ); + FileSystem::Type defaultFS = FileSystem::Ext4; - if ( defaultFs == FileSystem::Unknown ) - defaultFs = FileSystem::Ext4; + if ( gs->contains( "defaultFileSystemType" ) ) + { + PartUtils::findFS( gs->value( "defaultFileSystemType" ).toString(), &defaultFS); + if ( defaultFS == FileSystem::Unknown ) + defaultFS = FileSystem::Ext4; + } - return defaultFs; + return defaultFS; } PartitionLayout::PartitionLayout() @@ -145,7 +150,7 @@ PartitionLayout::addEntry( const QString& label, const QString& mountPoint, cons entry.partLabel = label; entry.partMountPoint = mountPoint; - entry.partFileSystem = FileSystem::typeForName( fs ); + PartUtils::findFS( fs, &entry.partFileSystem ); if ( entry.partFileSystem == FileSystem::Unknown ) entry.partFileSystem = m_defaultFsType; @@ -214,7 +219,7 @@ PartitionLayout::execute( Device *dev, qint64 firstSector, parent, *dev, role, - static_cast(part.partFileSystem), + part.partFileSystem, firstSector, end, PartitionTable::FlagNone @@ -226,7 +231,7 @@ PartitionLayout::execute( Device *dev, qint64 firstSector, parent, *dev, role, - static_cast(part.partFileSystem), + part.partFileSystem, firstSector, end, luksPassphrase, diff --git a/src/modules/partition/core/PartitionLayout.h b/src/modules/partition/core/PartitionLayout.h index f2a4cbff5..999e10425 100644 --- a/src/modules/partition/core/PartitionLayout.h +++ b/src/modules/partition/core/PartitionLayout.h @@ -24,6 +24,7 @@ // KPMcore #include +#include // Qt #include @@ -48,7 +49,7 @@ public: { QString partLabel; QString partMountPoint; - int partFileSystem = 0; + FileSystem::Type partFileSystem = FileSystem::Unknown; double partSize = 0.0L; SizeUnit partSizeUnit = Percent; double partMinSize = 0.0L; @@ -76,7 +77,7 @@ public: QList< Partition* > execute( Device *dev, qint64 firstSector, qint64 lastSector, QString luksPassphrase, PartitionNode* parent, const PartitionRole& role ); private: - int m_defaultFsType; + FileSystem::Type m_defaultFsType; QList< PartitionEntry > m_partLayout; }; diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index a152db14b..3c71302e0 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -493,55 +493,6 @@ nameToChoice( QString name, bool& ok ) return names.find( name, ok ); } -/** @brief translate @p defaultFS into a recognized name - * - * Makes several attempts to translate the string into a - * name that KPMCore will recognize. - */ -static QString -findFS( QString defaultFS ) -{ - QStringList fsLanguage { QLatin1Literal( "C" ) }; // Required language list to turn off localization - if ( defaultFS.isEmpty() ) - { - cWarning() << "Partition-module setting *defaultFileSystemType* is missing, using ext4"; - defaultFS = QStringLiteral( "ext4" ); - } - if ( FileSystem::typeForName( defaultFS, fsLanguage ) != FileSystem::Unknown ) - { - cDebug() << "Partition-module setting *defaultFileSystemType*" << defaultFS; - return defaultFS; - } - - // Second pass: try case-insensitive - const auto fstypes = FileSystem::types(); - for ( FileSystem::Type t : fstypes ) - { - if ( 0 == QString::compare( defaultFS, FileSystem::nameForType( t, fsLanguage ), Qt::CaseInsensitive ) ) - { - defaultFS = FileSystem::nameForType( t, fsLanguage ); - cWarning() << "Partition-module setting *defaultFileSystemType* changed" << defaultFS; - return defaultFS; - } - } - - cWarning() << "Partition-module setting *defaultFileSystemType* is bad (" << defaultFS << ") using ext4."; - defaultFS = QStringLiteral( "ext4" ); -#ifdef DEBUG_FILESYSTEMS - // This bit is for distro's debugging their settings, and shows - // all the strings that KPMCore is matching against for FS type. - { - Logger::CDebug d; - using TR = Logger::DebugRow< int, QString >; - const auto fstypes = FileSystem::types(); - d << "Available types (" << fstypes.count() << ')'; - for ( FileSystem::Type t : fstypes ) - d << TR( static_cast( t ), FileSystem::nameForType( t, fsLanguage ) ); - } -#endif - return defaultFS; -} - void PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { @@ -630,7 +581,21 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) gs->insert( "alwaysShowPartitionLabels", CalamaresUtils::getBool( configurationMap, "alwaysShowPartitionLabels", true ) ); gs->insert( "enableLuksAutomatedPartitioning", CalamaresUtils::getBool( configurationMap, "enableLuksAutomatedPartitioning", true ) ); gs->insert( "allowManualPartitioning", CalamaresUtils::getBool( configurationMap, "allowManualPartitioning", true ) ); - gs->insert( "defaultFileSystemType", findFS( CalamaresUtils::getString( configurationMap, "defaultFileSystemType" ) ) ); + + // The defaultFileSystemType setting needs a bit more processing, + // as we want to cover various cases (such as different cases) + QString fsName = CalamaresUtils::getString( configurationMap, "defaultFileSystemType" ); + FileSystem::Type fsType; + if ( fsName.isEmpty() ) + cWarning() << "Partition-module setting *defaultFileSystemType* is missing, will use ext4"; + QString fsRealName = PartUtils::findFS( fsName, &fsType ); + if ( fsRealName == fsName ) + cDebug() << "Partition-module setting *defaultFileSystemType*" << fsRealName; + else if ( fsType != FileSystem::Unknown ) + cWarning() << "Partition-module setting *defaultFileSystemType* changed" << fsRealName; + else + cWarning() << "Partition-module setting *defaultFileSystemType* is bad (" << fsRealName << ") using ext4."; + gs->insert( "defaultFileSystemType", fsRealName ); // Now that we have the config, we load the PartitionCoreModule in the background From e366e7d83ac99f768b0bbb4c5c33966de876b388 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 22 Feb 2019 16:38:02 -0500 Subject: [PATCH 20/20] [displaymanager] It's not fatal to have no DM - If a distro provides an install-scenario that doesn't provide a DM, (e.g. via netinstall) then that should be ok; if there **is** a DM it should be configured. FIXES: #1095 --- src/modules/displaymanager/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/displaymanager/main.py b/src/modules/displaymanager/main.py index 08eeb6fdb..4413aefbb 100644 --- a/src/modules/displaymanager/main.py +++ b/src/modules/displaymanager/main.py @@ -768,11 +768,11 @@ def run(): displaymanagers.remove(dm) if not dm_impl: - return ( - _("No display managers selected for the displaymanager module."), - _("The list is empty after checking for installed display managers.") + libcalamares.utils.warning( + "No display managers selected for the displaymanager module. " + "The list is empty after checking for installed display managers." ) - + return None # Pick up remaining settings if "defaultDesktopEnvironment" in libcalamares.job.configuration: